#include "classes.h" // 008372e0 void GenericPopup::Render() { uint8_t bVar1; uint8_t *animName; int textWidth; AnimationState *frontAnimState; uint8_t *idleName; int line; uint32_t *lineText; bool bVar2; float y; float alignFactor; uint32_t drawSettings; uint32_t local_3c; uint32_t local_38; uint32_t local_34; uint32_t local_30; uint32_t local_2c; uint32_t local_28; Font *font; float lineOffsetY; Vector local_1c; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; local_8 = 0xffffffff; puStack_c = &LAB_00b0245d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x11])) + 0x1)))) != 0) && ((*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2))) != '\0')) { font = &g_manager->_font2_TeamMeatEx12; local_1c.x = (g_screenWidth - 480.0) * 0.5; local_1c.y = (g_screenHeight - 270.0) * 0.5; if ((*GHIDRA_CAST((GHIDRA_CAST(&(this[0x58])) + 0x1))) != '\0') { if ((*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1))) == '\0') { AnimationState::Render (GHIDRA_CAST((this + 0x10)),&local_1c,&g_vectorZero,&g_vectorZero); frontAnimState = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))); } else { AnimationState::Render (GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))),&local_1c,&g_vectorZero,&g_vectorZero); frontAnimState = GHIDRA_CAST((this + 0x10)); } AnimationState::Render(frontAnimState,&local_1c,&g_vectorZero,&g_vectorZero); } animName = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x11])) + 0x1)))); if ((animName != GHIDRA_CAST(0x0)) && ((*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2))) != '\0')) { if (0xf < *GHIDRA_CAST((animName + 0x14))) { animName = *GHIDRA_CAST(animName); } idleName = s_Idle; do { bVar1 = *animName; bVar2 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00837400: local_1c.x = (float)(-GHIDRA_UINT(bVar2) | 1); goto LAB_00837405; } if (bVar1 == 0) break; bVar1 = animName[1]; bVar2 = bVar1 < idleName[1]; if (bVar1 != idleName[1]) goto LAB_00837400; animName = animName + 2; idleName = idleName + 2; } while (bVar1 != 0); local_1c.x = 0.0; LAB_00837405: if (local_1c.x == 0.0) { lineOffsetY = -32.0; lineText = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x62])) + 0x2)))); line = 0; local_1c.y = 18.0; do { alignFactor = 0.5; if (GHIDRA_CAST(*lineText) != GHIDRA_CAST(0x0)) { drawSettings = 0; local_3c = 0xffff; local_38 = 0; local_34 = 0x3f800000; local_30 = 0xffffffff; local_2c = 0; local_28 = 0; local_8 = 0; y = g_screenHeight * 0.5 + (&lineOffsetY)[line]; textWidth = Font::get_string_width_utf16(font,GHIDRA_CAST(*lineText),-1); Font::draw_string_wide_unscaled (font,GHIDRA_CAST(*lineText), g_screenWidth * alignFactor - (float)((double)textWidth + __uint_to_double_fixup[-(textWidth >> 0x1f)]) * alignFactor,y,GHIDRA_CAST((this + 0x5c)),&drawSettings); } line = line + 1; lineText = lineText + 1; } while (line < 3); } } } ExceptionList = local_10; return; } // 009c6130 void GenericPopup::destructor() { char isLastRef; uint32_t uVar1; void *local_10; uint8_t *puStack_c; uint32_t local_8; puStack_c = &LAB_00af0b40; local_10 = ExceptionList; uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x6e])) + 0x2)))) = KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = 0; if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x71])) + 0x1)))) != GHIDRA_CAST(0x0)) { isLastRef = (**(code **)(**GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x71])) + 0x1)))) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(this + 0x70); } } (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x66])) + 0x2))))))->msvc::string::_Tidy_deallocate(); local_8 = 1; ANM2::Reset(GHIDRA_CAST(this)); AnimationState::~AnimationState(GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2))))); AnimationState::~AnimationState(GHIDRA_CAST((this + 0x10))); (GHIDRA_CAST((GHIDRA_CAST((this + 8)))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(this))))->msvc::string::_Tidy_deallocate(); ExceptionList = local_10; return; }