#include "classes.h" // 00685fc0 void Console::destructor() { uint32_t uVar1; void *local_10; uint8_t *puStack_c; uint32_t uStack_8; void *ownedNode; uStack_8 = 0xffffffff; puStack_c = &LAB_00af0a50; local_10 = ExceptionList; uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; _eh_vector_destructor_iterator_(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x26])) + 0x2))),0x18,6,msvc::string::_Tidy_deallocate); FUN_006936f0(uVar1); ownedNode = *(void **)(this + 0x1c); *GHIDRA_CAST((this + 0x1c)) = 0; operator_delete(ownedNode,8); FUN_00693ac0(); ownedNode = *(void **)&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x15])) + 0x1))); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x15])) + 0x1)))) = 0; operator_delete(ownedNode,8); FUN_0042f240(); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))))))->msvc::string::_Tidy_deallocate(); ExceptionList = local_10; return; } // 00686220 void Console::LoadCommandHistory() { uint8_t bVar1; code *pcVar2; uint32_t uVar3; int *file; int iVar4; void *newBlock; uint8_t *lineEnd; int historyMap; uint32_t uVar5; std_string line; uint8_t lineBuf [1024]; uint8_t historyPath [260]; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; uint32_t local_14; char *entry; puStack_20 = historyPath + 0x124; local_14 = 0xffffffff; puStack_18 = &LAB_00af8540; local_1c = ExceptionList; uVar3 = __security_cookie ^ GHIDRA_UINT((historyPath + 0x118)); ExceptionList = &local_1c; local_24 = uVar3; sprintf_s(historyPath,0x100,&DAT_00b60c28); if (((g_manager->_netplayManager == *GHIDRA_CAST((g_manager + 1))) && (((g_game == GHIDRA_CAST(0x0) || ((g_game->_dailyChallenge)._id == 0)) || ((g_game->_dailyChallenge)._isPractice != 0)))) && (((g_manager->_optionsConfig)._enableDebugConsole != 0 && ((g_manager->_optionsConfig)._enableSaveCommandHistory != 0)))) { file = (GHIDRA_CAST((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_read(historyPath); if (file != GHIDRA_CAST(0x0)) { uVar3 = (**(code **)(*file + 0x18))(lineBuf,0x400,uVar3); while (0 < GHIDRA_INT(uVar3)) { do { iVar4 = isspace(GHIDRA_INT(line._buf[uVar3 + 0x17])); if (iVar4 == 0) { if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) < 0x40) { lineEnd = lineBuf; line._size = 0; line._capacity = 0xf; line._buf[0] = '\0'; line._buf[1] = '\0'; line._buf[2] = '\0'; line._buf[3] = '\0'; do { bVar1 = *lineEnd; lineEnd = lineEnd + 1; } while (bVar1 != 0); (GHIDRA_CAST((line._buf)))->msvc::string::assign(lineBuf,GHIDRA_INT(lineEnd) - GHIDRA_INT((lineBuf + 1))); local_14 = 0; iVar4 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))); uVar3 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1e])) + 0x2)))); if (uVar3 <= iVar4 + 1U) { FUN_006937a0(uVar3); uVar3 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1e])) + 0x2)))); iVar4 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))); } uVar5 = uVar3 - 1 & *GHIDRA_CAST((this + 0x20)); *GHIDRA_CAST((this + 0x20)) = uVar5; iVar4 = (uVar3 - 1 & uVar5 + iVar4) * 4; historyMap = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1)))); if (*GHIDRA_CAST((historyMap + iVar4)) == 0) { newBlock = operator_new(0x18); *(void **)(iVar4 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1))))) = newBlock; historyMap = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1)))); } entry = *GHIDRA_CAST((iVar4 + historyMap)); *GHIDRA_CAST(entry) = (*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0x0))); *GHIDRA_CAST((entry + 4)) = (*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0x4))); *GHIDRA_CAST((entry + 8)) = (*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0x8))); *GHIDRA_CAST((entry + 0xc)) = (*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0xc))); *GHIDRA_CAST((entry + 0x10)) = line._size; *GHIDRA_CAST((entry + 0x14)) = line._capacity; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) + 1; local_14 = 0xffffffff; } break; } uVar5 = uVar3 - 1; if (0x3ff < uVar5) { FUN_00aef86f(); pcVar2 = (code *)swi(3); (*pcVar2)(); return; } line._buf[uVar3 + 0x17] = '\0'; uVar3 = uVar5; } while (0 < GHIDRA_INT(uVar5)); uVar3 = (**(code **)(*file + 0x18))(lineBuf,0x400); } (**(code **)*file)(1); } } else { remove(GHIDRA_CAST(historyPath)); } ExceptionList = local_1c; return; } // 006864a0 void Console::history_push(std_string line) { uint64_t qVar1; uint8_t bVar2; int iVar3; uint8_t *b; int slotOffset; void *pvVar4; uint32_t containerProxy; uint8_t *puVar5; uint8_t *a; uint64_t *heapCounter; uint32_t uVar6; uint32_t frontOffset; char consoleLine [24]; uint32_t lineFrames; uint32_t lineColor; int local_34; uint32_t local_30; void *emptyText [3]; uint8_t eraseResult [4]; uint32_t emptyTextSize; uint32_t emptyTextCapacity; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; int *historyProxy; uint32_t *lastEntrySize; puStack_c = &LAB_00af858d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((eraseResult + 0x1c)); ExceptionList = &local_10; local_8 = 0; uVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))); if (*GHIDRA_CAST((this + 0x20)) < uVar6) { historyProxy = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x22])) + 0x2)))); if (historyProxy == GHIDRA_CAST(0x0)) { iVar3 = 0; } else { iVar3 = *historyProxy; } a = *GHIDRA_CAST((*GHIDRA_CAST((iVar3 + 4)) + (*GHIDRA_CAST((iVar3 + 8)) - 1U & uVar6 - 1) * 4)); b = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { b = *GHIDRA_CAST(b); } lastEntrySize = GHIDRA_CAST((a + 0x10)); if (0xf < *GHIDRA_CAST((a + 0x14))) { a = *GHIDRA_CAST(a); } bVar2 = str_eq(a,*lastEntrySize,b,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2))))); if (bVar2 != 0) { FUN_006938e0(eraseResult,historyProxy,0,uVar6 - 1,historyProxy,0,uVar6); } } uVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1e])) + 0x2)))); if (uVar6 <= *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) + 1U) { FUN_006937a0(uVar6); uVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1e])) + 0x2)))); } frontOffset = uVar6 - 1 & *GHIDRA_CAST((this + 0x20)); *GHIDRA_CAST((this + 0x20)) = frontOffset; if (frontOffset == 0) { frontOffset = uVar6; } iVar3 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1)))); frontOffset = frontOffset - 1; slotOffset = (uVar6 - 1 & frontOffset) * 4; if (*GHIDRA_CAST((iVar3 + slotOffset)) == 0) { pvVar4 = operator_new(0x18); *(void **)(slotOffset + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1))))) = pvVar4; iVar3 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1d])) + 0x1)))); } (GHIDRA_CAST((*GHIDRA_CAST((iVar3 + slotOffset)))))->msvc::string::string(&line); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) + 1; *GHIDRA_CAST((this + 0x20)) = frontOffset; if (this + 0x1c == GHIDRA_CAST(0x0)) { containerProxy = 0; } else { containerProxy = *GHIDRA_CAST((this + 0x1c)); } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x22])) + 0x2)))) = containerProxy; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))) = frontOffset; if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) != 0) && (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { emptyTextSize = 0; emptyTextCapacity = 0xf; emptyText[0] = (void *)0x0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST((consoleLine)))->msvc::string::string(emptyText); lineFrames = 0x96; lineColor = 0xffd3d3d3; local_34 = 0; local_30 = 1; local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),2); msvc::deque::push_front(consoleLine); if (local_34 != 0) { if (g_mainHeap == (void *)0x0) { heapCounter = &g_allocatedBytesNoHeap; } else { heapCounter = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } uVar6 = *GHIDRA_CAST((local_34 + -4)); qVar1 = *heapCounter; *GHIDRA_CAST(heapCounter) = GHIDRA_UINT(*heapCounter) - uVar6; *GHIDRA_CAST((GHIDRA_CAST(heapCounter) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(heapCounter) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < uVar6)); free((void *)(local_34 + -4)); } (GHIDRA_CAST((consoleLine)))->msvc::string::_Tidy_deallocate(); local_8 = local_8 & 0xffffff00; if (0xf < emptyTextCapacity) { uVar6 = emptyTextCapacity + 1; pvVar4 = emptyText[0]; if (0xfff < uVar6) { pvVar4 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); uVar6 = emptyTextCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_006866f9; } operator_delete(pvVar4,uVar6); } } puVar5 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar5 = *GHIDRA_CAST(puVar5); } FUN_00693180(this,0xff808080,&DAT_00b657fc,puVar5); if (0xf < line._capacity) { uVar6 = line._capacity + 1; pvVar4 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)line._buf)) + 0x0))); if (0xfff < uVar6) { pvVar4 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0x0))) + -4); uVar6 = line._capacity + 0x24; if (0x1f < ((*GHIDRA_CAST((GHIDRA_CAST(&(line._buf)) + 0x0))) - GHIDRA_INT(pvVar4)) - 4U) { LAB_006866f9: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar4,uVar6); } ExceptionList = local_10; return; } // 006867e0 void Console::get_visible_line_range(uint32_t *outRange) { int iVar1; uint32_t *result; int linesLeft; int iVar2; uint32_t firstLine; int lineOffset; uint32_t local_18 [5]; bool isClampToStart; uint32_t resultOffset; firstLine = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))); if (firstLine == 0) { *outRange = 0; outRange[1] = 0; return; } iVar1 = (g_manager->_optionsConfig)._consoleFont; if (iVar1 != 0) { if (iVar1 == 1) { iVar1 = 0xc; goto LAB_00686833; } if (iVar1 == 2) { iVar1 = 8; goto LAB_00686833; } } iVar1 = 0xf; LAB_00686833: local_18[2] = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))); lineOffset = 0; linesLeft = GHIDRA_INT((g_screenHeight / ((float)iVar1 + 0.0))) + -7; iVar1 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) + local_18[2]; do { firstLine = firstLine - 1; if (iVar1 == local_18[2]) { lineOffset = 0; LAB_006868b5: local_18[1] = 0; local_18[0] = GHIDRA_UINT((*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) == 0)); if ((GHIDRA_INT(firstLine) < GHIDRA_INT(local_18[0])) || ((firstLine == local_18[0] && (lineOffset < 0)))) { isClampToStart = true; } else { isClampToStart = false; } result = local_18; if (!isClampToStart) { result = &firstLine; } resultOffset = result[1]; *outRange = *result; outRange[1] = resultOffset; return; } if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x15])) + 0x1)))) == GHIDRA_CAST(0x0)) { iVar2 = 0; } else { iVar2 = **GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x15])) + 0x1)))); } lineOffset = *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar2 + 4)) + (*GHIDRA_CAST((iVar2 + 8)) - 1U & iVar1 - 1U) * 4 )) + 0x24)); if (linesLeft <= lineOffset) { lineOffset = lineOffset - linesLeft; goto LAB_006868b5; } linesLeft = linesLeft - lineOffset; iVar1 = iVar1 + -1; } while( true ); } // 00686950 void Console::Close() { int *historyFile; int historyDeque; int historyDequeCopy; int *historyLine; uint32_t lineIndex; uint8_t historyPath [260]; uint32_t local_8; int *historyProxy; Manager *manager; manager = g_manager; local_8 = __security_cookie ^ GHIDRA_UINT((historyPath + 0x108)); if (1 < *GHIDRA_CAST(this)) { *GHIDRA_CAST(this) = 4; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x1)))) = 0; manager->_isHotkeysEnabled = 1; if (((manager->_netplayManager == *GHIDRA_CAST((manager + 1))) && (((g_game == GHIDRA_CAST(0x0) || ((g_game->_dailyChallenge)._id == 0)) || ((g_game->_dailyChallenge)._isPractice != 0)))) && (((manager->_optionsConfig)._enableDebugConsole != 0 && ((manager->_optionsConfig)._enableSaveCommandHistory != 0)))) { sprintf_s(historyPath,0x100,&DAT_00b60c28); if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) == 0) { remove(GHIDRA_CAST(historyPath)); return; } historyFile = (GHIDRA_CAST((&PTR_vftable_00c5aa80)))->SaveDataManager::open_file_write(historyPath,0); if (historyFile != GHIDRA_CAST(0x0)) { historyProxy = *GHIDRA_CAST((this + 0x1c)); for (lineIndex = *GHIDRA_CAST((this + 0x20)); lineIndex != *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) + *GHIDRA_CAST((this + 0x20)); lineIndex = lineIndex + 1) { if (historyProxy == GHIDRA_CAST(0x0)) { historyDeque = 0; } else { historyDeque = *historyProxy; } if (historyProxy == GHIDRA_CAST(0x0)) { historyDequeCopy = 0; } else { historyDequeCopy = *historyProxy; } historyLine = *GHIDRA_CAST((*GHIDRA_CAST((historyDequeCopy + 4)) + (*GHIDRA_CAST((historyDequeCopy + 8)) - 1U & lineIndex) * 4)); if (0xf < GHIDRA_UINT(historyLine[5])) { historyLine = GHIDRA_CAST(*historyLine); } (*(code *)(GHIDRA_CAST(*historyFile))[7]) (historyLine,1, *(uint32_t *) (*GHIDRA_CAST((*GHIDRA_CAST((historyDeque + 4)) + (*GHIDRA_CAST((historyDeque + 8)) - 1U & lineIndex) * 4)) + 0x10)); (**(code **)(*historyFile + 0x1c))(&DAT_00b657f8,1,2); } (**(code **)*historyFile)(1); } } } return; } // 00686b70 void Console::submit_input(int unused) { std_string *where; uint32_t uVar1; uint32_t uVar2; std_string line; char isLocalPlayer; char *inputEnd; int iVar3; uint32_t uVar4; char *cursor; int netPlayers; void *ptr; uint8_t *inputText; uint32_t uVar5; char acStackY_f0 [128]; uint64_t in_stack_ffffff94; uint32_t in_stack_ffffff9c; uint32_t in_stack_ffffffa0; uint32_t in_stack_ffffffa4; uint32_t in_stack_ffffffa8; uint8_t *inputSize; void *command; char acStack_38 [4]; char acStack_34 [4]; char acStack_30 [8]; uint32_t uStack_28; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; uint32_t local_14; Manager *manager; puStack_20 = acStackY_f0 + 0xec; local_14 = 0xffffffff; puStack_18 = &LAB_00af85cd; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((acStackY_f0 + 0xe0)); ExceptionList = &local_1c; inputText = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (*GHIDRA_CAST((this + 0x10)) < 0x10) { inputEnd = inputText + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); cursor = inputText; } else { inputEnd = *GHIDRA_CAST(inputText) + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); cursor = *GHIDRA_CAST(inputText); } inputSize = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2))); netPlayers = 0; for (; cursor != inputEnd; cursor = cursor + 1) { iVar3 = netPlayers + 1; if (*cursor != ' ') { iVar3 = netPlayers; } netPlayers = iVar3; } if (netPlayers != *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2))))) { (GHIDRA_CAST((acStackY_f0 + 0x84)))->msvc::string::string(inputText); line._buf[8] = (char)in_stack_ffffff9c; line._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 8); line._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x10); line._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffff9c) >> 0x18); line._buf[0] = (char)in_stack_ffffff94; line._buf[1] = (char)((uint64_t)in_stack_ffffff94 >> 8); line._buf[2] = (char)((uint64_t)in_stack_ffffff94 >> 0x10); line._buf[3] = (char)((uint64_t)in_stack_ffffff94 >> 0x18); line._buf[4] = (char)((uint64_t)in_stack_ffffff94 >> 0x20); line._buf[5] = (char)((uint64_t)in_stack_ffffff94 >> 0x28); line._buf[6] = (char)((uint64_t)in_stack_ffffff94 >> 0x30); line._buf[7] = (char)((uint64_t)in_stack_ffffff94 >> 0x38); line._buf[0xc] = (char)in_stack_ffffffa0; line._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 8); line._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x10); line._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffa0) >> 0x18); line._size = in_stack_ffffffa4; line._capacity = in_stack_ffffffa8; history_push(this,line); local_14 = 0; command = *(void **)inputText; uVar4 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[10])) + 0x2)))); uVar1 = *GHIDRA_CAST((this + 0xc)); uVar2 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xd])) + 0x1)))); unique0x0000a400 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); *GHIDRA_CAST(inputText) = 0; *(char (*) [4])&(*GHIDRA_CAST((GHIDRA_CAST(&(this[10])) + 0x2))) = acStack_38; *(char (*) [4])(this + 0xc) = acStack_34; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xd])) + 0x1)))) = (*GHIDRA_CAST((GHIDRA_CAST(&(acStack_30)) + 0x0))); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))) = 0xf00000000; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x12])) + 0x2)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x11])) + 0x1)))); if (0xf < *GHIDRA_CAST((this + 0x10))) { inputText = *GHIDRA_CAST(inputText); } *GHIDRA_CAST((this + 0x58)) = inputText + *GHIDRA_CAST(inputSize); manager = g_manager; netPlayers = g_manager->_netplayManager; acStack_38 = (char [4])uVar4; acStack_34 = (char [4])uVar1; (*GHIDRA_CAST((GHIDRA_CAST(&(acStack_30)) + 0x0))) = uVar2; if (netPlayers == *GHIDRA_CAST((g_manager + 1))) { RunCommand(this,GHIDRA_CAST(&command),GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); } else { uVar5 = 0; if (*GHIDRA_CAST((g_manager + 1)) - netPlayers >> 2 != 0) { do { netPlayers = *GHIDRA_CAST((netPlayers + uVar5 * 4)); isLocalPlayer = (**(code **)(*GHIDRA_CAST((netPlayers + 0x370)) + 0x14))(); if (isLocalPlayer != '\0') { where = *GHIDRA_CAST((netPlayers + 0x3dc)); if (where == *GHIDRA_CAST((netPlayers + 0x3e0))) { vector_string_emplace_reallocate ((void *)(netPlayers + 0x3d8),where,GHIDRA_CAST(&command)); } else { (GHIDRA_CAST((where->_buf)))->msvc::string::string(GHIDRA_CAST(&command)); *GHIDRA_CAST((netPlayers + 0x3dc)) = *GHIDRA_CAST((netPlayers + 0x3dc)) + 0x18; } break; } uVar5 = uVar5 + 1; netPlayers = manager->_netplayManager; } while (uVar5 < GHIDRA_UINT((*GHIDRA_CAST((manager + 1)) - netPlayers >> 2))); } } if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) == 0) || (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { uVar4 = 0; } else { uVar4 = 1; } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = uVar4; *GHIDRA_CAST((this + 4)) = 0; if (0xf < uStack_28) { uVar5 = uStack_28 + 1; ptr = command; if (0xfff < uVar5) { ptr = *(void **)(GHIDRA_CAST(command) + -4); uVar5 = uStack_28 + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(command) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ptr,uVar5); } } ExceptionList = local_1c; return; } // 00686da0 void Console::FillOmnicomplete() { Console *roomConfig = this; uint8_t bVar1; char cVar2; uint32_t *newNode; int iVar3; char *pcVar4; std_string *psVar5; uint32_t *puVar6; EntityConfig_Entity *entityConfigEntry; ItemConfig_Item **ppIVar7; uint32_t *doorMask; int iVar8; ItemConfig_Card *cardConfig; Manager *pMVar9; Font *font; uint8_t unused; uint8_t unused_00; uint8_t *nameEnd; uint8_t *pbVar10; void *freeBlock; uint32_t extraout_ECX; uint32_t extraout_ECX_00; uint32_t extraout_ECX_01; uint32_t extraout_ECX_02; uint32_t extraout_ECX_03; uint32_t extraout_ECX_04; ItemConfig *itemConfig; uint32_t extraout_ECX_05; uint32_t extraout_ECX_06; uint32_t extraout_ECX_07; uint32_t extraout_ECX_08; uint32_t uVar11; uint32_t uVar12; int extraout_EDX; int language; int language_00; ItemConfig_Item **roomVariantPtr; basic_string,msvc::allocator_> *omnicompleteText; ItemConfig_Item *pIVar13; int *listNode; ItemConfig_Item *maxRoomVariant; EntityConfig_Entity *pEVar14; uint64_t uVar15; uint32_t uVar16; uint32_t uVar17; uint8_t omnicompleteEntries [12]; int *gridEntityNames; int *curseNames; int *commandNames; int *roomTypeNames; int roomTypeNameCount; uint8_t local_204 [4]; uint8_t local_200 [4]; uint8_t local_1fc [4]; uint8_t local_1f8 [4]; uint8_t local_1f4 [4]; uint8_t local_1f0 [4]; int **local_1ec; uint32_t local_1e8; EntityConfig_Entity *local_1e4; Manager *local_1e0; ItemConfig_Item *local_1dc; uint32_t cleanupFlags; uint8_t local_1d2; uint8_t local_1d1; uint8_t local_1d0 [4]; int *debugFlagNames; uint32_t debugFlagNameCount; ItemConfig_Item *local_1c4; char local_1bd; EntityConfig_Entity *local_1bc; uint8_t words [12]; char local_1ac [24]; std_string local_194; std_string displayName; basic_string,msvc::allocator_> local_164 [8]; uint8_t stageIdText [4]; EntityConfig_Entity *rooms; EntityConfig_Entity *roomsEnd; basic_string,msvc::allocator_> entryText [24]; uint8_t completionEntry [128]; uint8_t entryIdText [32]; uint8_t idText [32]; uint8_t cardIdText [8]; std_string local_6c; uint8_t debugFlagText [32]; uint8_t pillIdText [8]; void *tmpString [2]; uint8_t roomIdText [8]; uint32_t tmpStringSize; uint32_t tmpStringCapacity; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; Game *game; RoomConfig *roomConfig; ItemConfig_Item *roomVariant; local_8 = 0xffffffff; puStack_c = &LAB_00af8e99; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((roomIdText + 0x20)); ExceptionList = &local_10; cleanupFlags = 0; local_1c4 = *GHIDRA_CAST(ThreadLocalStoragePointer); local_1bc = GHIDRA_CAST(roomConfig); if ((*GHIDRA_CAST(((local_1c4->name)._buf + 4)) < DAT_00c80250) && (_Init_thread_header(&DAT_00c80250,local_14), DAT_00c80250 == -1)) { _DAT_00c5cab8 = 0x77617073; DAT_00c5cabc = 0x6e; DAT_00c5cae8 = 's'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cae8_1)) + 0x0))) = 't'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cae8_1)) + 0x1))) = 'a'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cae8_1)) + 0x2))) = 'g'; DAT_00c5caec = 0x65; _DAT_00c5cb00 = 0x7761707364697267; DAT_00c5cb08 = 0x6e; DAT_00c5cb18 = 'd'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb18_1)) + 0x0))) = 'e'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb18_1)) + 0x1))) = 'b'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb18_1)) + 0x2))) = 'u'; DAT_00c5cb1c = 0x67; DAT_00c5cb30 = 'g'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb30_1)) + 0x0))) = 'i'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb30_1)) + 0x1))) = 'v'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb30_1)) + 0x2))) = 'e'; DAT_00c5cb34 = 'i'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb34_1)) + 0x0))) = 't'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb34_1)) + 0x1))) = 'e'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb34_1)) + 0x2))) = 'm'; DAT_00c5cb48 = 'r'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb48_1)) + 0x0))) = 'e'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb48_1)) + 0x1))) = 'm'; (*GHIDRA_CAST((GHIDRA_CAST(&(DAT_00c5cb48_1)) + 0x2))) = 'o'; _DAT_00c5cb4c = 0x6576; local_8 = 6; (GHIDRA_CAST((&DAT_00c5cb60)))->msvc::string::assign(GHIDRA_CAST("costumetest"),0xb); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 7; _DAT_00c5cb88 = 0; _DAT_00c5cb8c = 0xf; _DAT_00c5cb78 = 0; (GHIDRA_CAST((&DAT_00c5cb78)))->msvc::string::assign(&DAT_00b65858,4); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 8; _DAT_00c5cba0 = 0; _DAT_00c5cba4 = 0xf; _DAT_00c5cb90 = 0; (GHIDRA_CAST((&DAT_00c5cb90)))->msvc::string::assign(GHIDRA_CAST("restart"),7); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 9; _DAT_00c5cbb8 = 0; _DAT_00c5cbbc = 0xf; _DAT_00c5cba8 = 0; (GHIDRA_CAST((&DAT_00c5cba8)))->msvc::string::assign(GHIDRA_CAST("listcollectibles"),0x10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 10; _DAT_00c5cbd0 = 0; _DAT_00c5cbd4 = 0xf; _DAT_00c5cbc0 = 0; (GHIDRA_CAST((&DAT_00c5cbc0)))->msvc::string::assign(GHIDRA_CAST("repeat"),6); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb; _DAT_00c5cbe8 = 0; _DAT_00c5cbec = 0xf; _DAT_00c5cbd8 = 0; (GHIDRA_CAST((&DAT_00c5cbd8)))->msvc::string::assign(GHIDRA_CAST("clearseeds"),10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc; _DAT_00c5cc00 = 0; _DAT_00c5cc04 = 0xf; _DAT_00c5cbf0 = 0; (GHIDRA_CAST((&DAT_00c5cbf0)))->msvc::string::assign(&DAT_00b658e4,4); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd; _DAT_00c5cc18 = 0; _DAT_00c5cc1c = 0xf; _DAT_00c5cc08 = 0; (GHIDRA_CAST((&DAT_00c5cc08)))->msvc::string::assign(GHIDRA_CAST("challenge"),9); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xe; _DAT_00c5cc30 = 0; _DAT_00c5cc34 = 0xf; _DAT_00c5cc20 = 0; (GHIDRA_CAST((&DAT_00c5cc20)))->msvc::string::assign(GHIDRA_CAST("combo"),5); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xf; _DAT_00c5cc48 = 0; _DAT_00c5cc4c = 0xf; _DAT_00c5cc38 = 0; (GHIDRA_CAST((&DAT_00c5cc38)))->msvc::string::assign(GHIDRA_CAST("cutscene"),8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x10; _DAT_00c5cc60 = 0; _DAT_00c5cc64 = 0xf; _DAT_00c5cc50 = 0; (GHIDRA_CAST((&DAT_00c5cc50)))->msvc::string::assign(GHIDRA_CAST("clearcache"),10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x11; _DAT_00c5cc78 = 0; _DAT_00c5cc7c = 0xf; _DAT_00c5cc68 = 0; (GHIDRA_CAST((&DAT_00c5cc68)))->msvc::string::assign(GHIDRA_CAST("macro"),5); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x12; _DAT_00c5cc90 = 0; _DAT_00c5cc94 = 0xf; _DAT_00c5cc80 = 0; (GHIDRA_CAST((&DAT_00c5cc80)))->msvc::string::assign(GHIDRA_CAST("playsfx"),7); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x13; _DAT_00c5cca8 = 0; _DAT_00c5ccac = 0xf; _DAT_00c5cc98 = 0; (GHIDRA_CAST((&DAT_00c5cc98)))->msvc::string::assign(&DAT_00b6591c,4); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x14; _DAT_00c5ccc0 = 0; _DAT_00c5ccc4 = 0xf; _DAT_00c5ccb0 = 0; (GHIDRA_CAST((&DAT_00c5ccb0)))->msvc::string::assign(GHIDRA_CAST("profstop"),8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x15; _DAT_00c5ccd8 = 0; _DAT_00c5ccdc = 0xf; _DAT_00c5ccc8 = 0; (GHIDRA_CAST((&DAT_00c5ccc8)))->msvc::string::assign(GHIDRA_CAST("curse"),5); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x16; _DAT_00c5ccf0 = 0; _DAT_00c5ccf4 = 0xf; _DAT_00c5cce0 = 0; (GHIDRA_CAST((&DAT_00c5cce0)))->msvc::string::assign(GHIDRA_CAST("reseed"),6); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x17; _DAT_00c5cd08 = 0; _DAT_00c5cd0c = 0xf; _DAT_00c5ccf8 = 0; (GHIDRA_CAST((&DAT_00c5ccf8)))->msvc::string::assign(&DAT_00b658fc,4); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x18; _DAT_00c5cd20 = 0; _DAT_00c5cd24 = 0xf; _DAT_00c5cd10 = 0; (GHIDRA_CAST((&DAT_00c5cd10)))->msvc::string::assign(&DAT_00b65904,4); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x19; _DAT_00c5cd38 = 0; _DAT_00c5cd3c = 0xf; _DAT_00c5cd28 = 0; (GHIDRA_CAST((&DAT_00c5cd28)))->msvc::string::assign(GHIDRA_CAST("clear"),5); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1a; _DAT_00c5cd50 = 0; _DAT_00c5cd54 = 0xf; _DAT_00c5cd40 = 0; (GHIDRA_CAST((&DAT_00c5cd40)))->msvc::string::assign(GHIDRA_CAST("metro"),5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0x1b); _DAT_00c5cd68 = 0; _DAT_00c5cd6c = 0xf; _DAT_00c5cd58 = 0; (GHIDRA_CAST((&DAT_00c5cd58)))->msvc::string::assign(GHIDRA_CAST("delirious"),9); local_8 = 0xffffffff; _atexit(FUN_00b15690); _Init_thread_footer(&DAT_00c80250); } FUN_00693f00(&DAT_00c5cab8,&DAT_00c5cd70); local_8 = 0x1c; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(GHIDRA_CAST("luarun"),6); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1d; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(GHIDRA_CAST("luamem"),6); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1e; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(GHIDRA_CAST("luamod"),6); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1f; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(GHIDRA_CAST("reloadshaders"),0xd); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x20; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(GHIDRA_CAST("reloadfx"),8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x21; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(&DAT_00b659d8,3); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x22; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } roomTypeNames = GHIDRA_CAST(0x0); roomTypeNameCount = 0; roomTypeNames = operator_new(0x20); *roomTypeNames = GHIDRA_INT(roomTypeNames); roomTypeNames[1] = GHIDRA_INT(roomTypeNames); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; uVar11 = 1; do { if ((GHIDRA_INT(uVar11) < 0) || (0x1d < uVar11)) { pbVar10 = &s_empty; } else { pbVar10 = (&PTR_DAT_00b1fd50)[uVar11]; } if (*pbVar10 != 0) { tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; nameEnd = pbVar10; do { bVar1 = *nameEnd; nameEnd = nameEnd + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(pbVar10,GHIDRA_INT(nameEnd) - GHIDRA_INT((pbVar10 + 1))); listNode = roomTypeNames; local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0x24); if (roomTypeNameCount == 0x7ffffff) { /* WARNING: Subroutine does not return */ msvc::_Xlength_error("list too long"); } local_1ec = &roomTypeNames; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x25; local_1e8 = 0; newNode = operator_new(0x20); FUN_00417100(tmpString); roomTypeNameCount = roomTypeNameCount + 1; puVar6 = GHIDRA_CAST(listNode[1]); *newNode = listNode; newNode[1] = puVar6; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; listNode[1] = GHIDRA_INT(newNode); local_1e8 = 0; *puVar6 = newNode; if (0xf < tmpStringCapacity) { uVar12 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar12) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar12 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar12); } } pIVar13 = local_1c4; uVar11 = uVar11 + 1; } while (uVar11 < 0x1f); if ((*GHIDRA_CAST(((local_1c4->name)._buf + 4)) < DAT_00c80254) && (_Init_thread_header(&DAT_00c80254), DAT_00c80254 == -1)) { (GHIDRA_CAST((&DAT_00c5cd70)))->msvc::string::assign(GHIDRA_CAST("1000:Rock"),9); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x26; _DAT_00c5cd98 = 0; _DAT_00c5cd9c = 0xf; _DAT_00c5cd88 = 0; (GHIDRA_CAST((&DAT_00c5cd88)))->msvc::string::assign(GHIDRA_CAST("1001:Rock Bomb"),0xe); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x27; _DAT_00c5cdb0 = 0; _DAT_00c5cdb4 = 0xf; _DAT_00c5cda0 = 0; (GHIDRA_CAST((&DAT_00c5cda0)))->msvc::string::assign(GHIDRA_CAST("1002:Alt Rock"),0xd); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x28; _DAT_00c5cdc8 = 0; _DAT_00c5cdcc = 0xf; _DAT_00c5cdb8 = 0; (GHIDRA_CAST((&DAT_00c5cdb8)))->msvc::string::assign(GHIDRA_CAST("1003:Tainted Rock"),0x11); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x29; _DAT_00c5cde0 = 0; _DAT_00c5cde4 = 0xf; _DAT_00c5cdd0 = 0; (GHIDRA_CAST((&DAT_00c5cdd0)))->msvc::string::assign(GHIDRA_CAST("1004:Super Tainted Rock"),0x17); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2a; _DAT_00c5cdf8 = 0; _DAT_00c5cdfc = 0xf; _DAT_00c5cde8 = 0; (GHIDRA_CAST((&DAT_00c5cde8)))->msvc::string::assign(GHIDRA_CAST("1300:TNT"),8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2b; _DAT_00c5ce10 = 0; _DAT_00c5ce14 = 0xf; _DAT_00c5ce00 = 0; (GHIDRA_CAST((&DAT_00c5ce00)))->msvc::string::assign(GHIDRA_CAST("1400:Fireplace1498:White Poop"),0x1d); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2c; _DAT_00c5ce28 = 0; _DAT_00c5ce2c = 0xf; _DAT_00c5ce18 = 0; (GHIDRA_CAST((&DAT_00c5ce18)))->msvc::string::assign(GHIDRA_CAST("1497:Black Poop"),0xf); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2d; _DAT_00c5ce40 = 0; _DAT_00c5ce44 = 0xf; _DAT_00c5ce30 = 0; (GHIDRA_CAST((&DAT_00c5ce30)))->msvc::string::assign(GHIDRA_CAST("1496:Golden Poop"),0x10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2e; _DAT_00c5ce58 = 0; _DAT_00c5ce5c = 0xf; _DAT_00c5ce48 = 0; (GHIDRA_CAST((&DAT_00c5ce48)))->msvc::string::assign(GHIDRA_CAST("1495:Chunky Poop"),0x10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2f; _DAT_00c5ce70 = 0; _DAT_00c5ce74 = 0xf; _DAT_00c5ce60 = 0; (GHIDRA_CAST((&DAT_00c5ce60)))->msvc::string::assign(GHIDRA_CAST("1494:Rainbow Poop"),0x11); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x30; _DAT_00c5ce88 = 0; _DAT_00c5ce8c = 0xf; _DAT_00c5ce78 = 0; (GHIDRA_CAST((&DAT_00c5ce78)))->msvc::string::assign(GHIDRA_CAST("1490:Red Poop"),0xd); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x31; _DAT_00c5cea0 = 0; _DAT_00c5cea4 = 0xf; _DAT_00c5ce90 = 0; (GHIDRA_CAST((&DAT_00c5ce90)))->msvc::string::assign(GHIDRA_CAST("1500:Brown Poop"),0xf); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x32; _DAT_00c5ceb8 = 0; _DAT_00c5cebc = 0xf; _DAT_00c5cea8 = 0; (GHIDRA_CAST((&DAT_00c5cea8)))->msvc::string::assign(GHIDRA_CAST("1900:Block"),10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x33; _DAT_00c5ced0 = 0; _DAT_00c5ced4 = 0xf; _DAT_00c5cec0 = 0; (GHIDRA_CAST((&DAT_00c5cec0)))->msvc::string::assign(GHIDRA_CAST("1930:Spikes"),0xb); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x34; _DAT_00c5cee8 = 0; _DAT_00c5ceec = 0xf; _DAT_00c5ced8 = 0; (GHIDRA_CAST((&DAT_00c5ced8)))->msvc::string::assign(GHIDRA_CAST("1931:On/Off Spikes"),0x12); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x35; _DAT_00c5cf00 = 0; _DAT_00c5cf04 = 0xf; _DAT_00c5cef0 = 0; (GHIDRA_CAST((&DAT_00c5cef0)))->msvc::string::assign(GHIDRA_CAST("1940:Spider Web"),0xf); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x36; _DAT_00c5cf18 = 0; _DAT_00c5cf1c = 0xf; _DAT_00c5cf08 = 0; (GHIDRA_CAST((&DAT_00c5cf08)))->msvc::string::assign(GHIDRA_CAST("3000:Pit"),8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x37; _DAT_00c5cf30 = 0; _DAT_00c5cf34 = 0xf; _DAT_00c5cf20 = 0; (GHIDRA_CAST((&DAT_00c5cf20)))->msvc::string::assign(GHIDRA_CAST("4000:Lock"),9); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x38; _DAT_00c5cf48 = 0; _DAT_00c5cf4c = 0xf; _DAT_00c5cf38 = 0; (GHIDRA_CAST((&DAT_00c5cf38)))->msvc::string::assign(GHIDRA_CAST("4500:Pressure Plate"),0x13); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x39; _DAT_00c5cf60 = 0; _DAT_00c5cf64 = 0xf; _DAT_00c5cf50 = 0; (GHIDRA_CAST((&DAT_00c5cf50)))->msvc::string::assign(GHIDRA_CAST("4500.1:Reward Plate"),0x13); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3a; _DAT_00c5cf78 = 0; _DAT_00c5cf7c = 0xf; _DAT_00c5cf68 = 0; (GHIDRA_CAST((&DAT_00c5cf68)))->msvc::string::assign(GHIDRA_CAST("5000:Devil Statue"),0x11); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3b; _DAT_00c5cf90 = 0; _DAT_00c5cf94 = 0xf; _DAT_00c5cf80 = 0; (GHIDRA_CAST((&DAT_00c5cf80)))->msvc::string::assign(GHIDRA_CAST("5001:Angel Statue"),0x11); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3c; _DAT_00c5cfa8 = 0; _DAT_00c5cfac = 0xf; _DAT_00c5cf98 = 0; (GHIDRA_CAST((&DAT_00c5cf98)))->msvc::string::assign(GHIDRA_CAST("9000:Trap Door"),0xe); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3d; _DAT_00c5cfc0 = 0; _DAT_00c5cfc4 = 0xf; _DAT_00c5cfb0 = 0; (GHIDRA_CAST((&DAT_00c5cfb0)))->msvc::string::assign(GHIDRA_CAST("9100:Staircase"),0xe); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3e; _DAT_00c5cfd8 = 0; _DAT_00c5cfdc = 0xf; _DAT_00c5cfc8 = 0; (GHIDRA_CAST((&DAT_00c5cfc8)))->msvc::string::assign(GHIDRA_CAST("10000:Gravity"),0xd); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; _atexit(FUN_00b15670); _Init_thread_footer(&DAT_00c80254); } FUN_00693f00(&DAT_00c5cd70,&DAT_00c5cfe0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3f; uVar16 = 0x20; debugFlagNames = GHIDRA_CAST(0x0); debugFlagNameCount = 0; debugFlagNames = operator_new(0x20); *debugFlagNames = GHIDRA_INT(debugFlagNames); debugFlagNames[1] = GHIDRA_INT(debugFlagNames); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; msvc::list::resize(uVar16); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Entity Positions")); pbVar10 = debugFlagText; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; do { bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(debugFlagText,GHIDRA_INT(pbVar10) - GHIDRA_INT((debugFlagText + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x41; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Grid")); pbVar10 = debugFlagText; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; do { bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(debugFlagText,GHIDRA_INT(pbVar10) - GHIDRA_INT((debugFlagText + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x42; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Infinite HP")); pbVar10 = debugFlagText; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; do { bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(debugFlagText,GHIDRA_INT(pbVar10) - GHIDRA_INT((debugFlagText + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x43; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006874b3; } operator_delete(freeBlock,uVar11); } sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:High Damage")); pbVar10 = debugFlagText; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; do { bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(debugFlagText,GHIDRA_INT(pbVar10) - GHIDRA_INT((debugFlagText + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x44; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; if (0xf < tmpStringCapacity) { uVar11 = tmpStringCapacity + 1; freeBlock = tmpString[0]; if (0xfff < uVar11) { freeBlock = *(void **)(GHIDRA_INT(tmpString[0]) + -4); uVar11 = tmpStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_006874b3: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar11); } sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Show Room Info")); pbVar10 = debugFlagText; tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; do { bVar1 = *pbVar10; pbVar10 = pbVar10 + 1; } while (bVar1 != 0); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::assign(debugFlagText,GHIDRA_INT(pbVar10) - GHIDRA_INT((debugFlagText + 1))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x45; list_string_push_back_move(tmpString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; if (0xf < tmpStringCapacity) { FUN_0040d000(tmpString[0],tmpStringCapacity + 1); } sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Show Hitspheres")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x46; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Show Damage Values")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x47; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Infinite Item Charges")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x48; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:High Luck")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x49; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Quick Kill")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4a; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Grid Info")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4b; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Player Item Info")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4c; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Show Grid Collision Points")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4d; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); sprintf_s(debugFlagText,0x20,GHIDRA_CAST("%d:Show Lua Memory Usage")); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(debugFlagText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4e; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); if ((*GHIDRA_CAST(((pIVar13->name)._buf + 4)) < DAT_00c80258) && (_Init_thread_header(&DAT_00c80258), DAT_00c80258 == -1)) { (GHIDRA_CAST((&DAT_00c80260)))->msvc::string::string_from_cstr(GHIDRA_CAST("0:None")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4f; (GHIDRA_CAST((&DAT_00c80278)))->msvc::string::string_from_cstr(GHIDRA_CAST("1:Darkness")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x50; (GHIDRA_CAST((&DAT_00c80290)))->msvc::string::string_from_cstr(GHIDRA_CAST("2:Labyrinth")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x51; (GHIDRA_CAST((&DAT_00c802a8)))->msvc::string::string_from_cstr(GHIDRA_CAST("4:Lost")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x52; (GHIDRA_CAST((&DAT_00c802c0)))->msvc::string::string_from_cstr(GHIDRA_CAST("8:Unknown")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x53; (GHIDRA_CAST((&DAT_00c802d8)))->msvc::string::string_from_cstr(GHIDRA_CAST("16:Cursed")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x54; (GHIDRA_CAST((&DAT_00c802f0)))->msvc::string::string_from_cstr(GHIDRA_CAST("32:Maze")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x55; (GHIDRA_CAST((&DAT_00c80308)))->msvc::string::string_from_cstr(GHIDRA_CAST("64:Blind")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; _atexit(FUN_00b15650); _Init_thread_footer(&DAT_00c80258); } FUN_00693f00(&DAT_00c80260,&DAT_00c80320); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x56; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(GHIDRA_CAST("128:Giant")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x57; list_string_push_back_move(entryText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x56; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); uVar16 = extraout_ECX; if (*GHIDRA_CAST(((pIVar13->name)._buf + 4)) < DAT_00c80320) { _Init_thread_header(&DAT_00c80320); uVar16 = extraout_ECX_05; if (DAT_00c80320 == -1) { (GHIDRA_CAST((&DAT_00c80328)))->msvc::string::string_from_cstr(GHIDRA_CAST("0: None")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x58; (GHIDRA_CAST((&DAT_00c80340)))->msvc::string::string_from_cstr(GHIDRA_CAST("1: Monstro")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x59; (GHIDRA_CAST((&DAT_00c80358)))->msvc::string::string_from_cstr(GHIDRA_CAST("2: LarryJr")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5a; (GHIDRA_CAST((&DAT_00c80370)))->msvc::string::string_from_cstr(GHIDRA_CAST("3: Chub")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5b; (GHIDRA_CAST((&DAT_00c80388)))->msvc::string::string_from_cstr(GHIDRA_CAST("4: Gurdy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5c; (GHIDRA_CAST((&DAT_00c803a0)))->msvc::string::string_from_cstr(GHIDRA_CAST("5: Monstro 2")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5d; (GHIDRA_CAST((&DAT_00c803b8)))->msvc::string::string_from_cstr(GHIDRA_CAST("6: Scolex")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5e; (GHIDRA_CAST((&DAT_00c803d0)))->msvc::string::string_from_cstr(GHIDRA_CAST("7: Famine")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5f; (GHIDRA_CAST((&DAT_00c803e8)))->msvc::string::string_from_cstr(GHIDRA_CAST("8: Pestilence")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x60; (GHIDRA_CAST((&DAT_00c80400)))->msvc::string::string_from_cstr(GHIDRA_CAST("9: War")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x61; (GHIDRA_CAST((&DAT_00c80418)))->msvc::string::string_from_cstr(GHIDRA_CAST("10: Death")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x62; (GHIDRA_CAST((&DAT_00c80430)))->msvc::string::string_from_cstr(GHIDRA_CAST("11: Duke")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 99; (GHIDRA_CAST((&DAT_00c80448)))->msvc::string::string_from_cstr(GHIDRA_CAST("12: Peep")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 100; (GHIDRA_CAST((&DAT_00c80460)))->msvc::string::string_from_cstr(GHIDRA_CAST("13: Loki")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x65; (GHIDRA_CAST((&DAT_00c80478)))->msvc::string::string_from_cstr(GHIDRA_CAST("14: Blastocyst")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x66; (GHIDRA_CAST((&DAT_00c80490)))->msvc::string::string_from_cstr(GHIDRA_CAST("15: Gemini")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x67; (GHIDRA_CAST((&DAT_00c804a8)))->msvc::string::string_from_cstr(GHIDRA_CAST("16: Fistula")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x68; (GHIDRA_CAST((&DAT_00c804c0)))->msvc::string::string_from_cstr(GHIDRA_CAST("17: Gish")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x69; (GHIDRA_CAST((&DAT_00c804d8)))->msvc::string::string_from_cstr(GHIDRA_CAST("18: Steven")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6a; (GHIDRA_CAST((&DAT_00c804f0)))->msvc::string::string_from_cstr(GHIDRA_CAST("19: Chad")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6b; (GHIDRA_CAST((&DAT_00c80508)))->msvc::string::string_from_cstr(GHIDRA_CAST("20: Headless Horseman")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6c; (GHIDRA_CAST((&DAT_00c80520)))->msvc::string::string_from_cstr(GHIDRA_CAST("21: Fallen")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6d; (GHIDRA_CAST((&DAT_00c80538)))->msvc::string::string_from_cstr(GHIDRA_CAST("22: Hollow")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6e; (GHIDRA_CAST((&DAT_00c80550)))->msvc::string::string_from_cstr(GHIDRA_CAST("23: Carrion queen")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6f; (GHIDRA_CAST((&DAT_00c80568)))->msvc::string::string_from_cstr(GHIDRA_CAST("24: Gurdy Jr.")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x70; (GHIDRA_CAST((&DAT_00c80580)))->msvc::string::string_from_cstr(GHIDRA_CAST("25: Husk")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x71; (GHIDRA_CAST((&DAT_00c80598)))->msvc::string::string_from_cstr(GHIDRA_CAST("26: Bloat")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x72; (GHIDRA_CAST((&DAT_00c805b0)))->msvc::string::string_from_cstr(GHIDRA_CAST("27: Lokii")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x73; (GHIDRA_CAST((&DAT_00c805c8)))->msvc::string::string_from_cstr(GHIDRA_CAST("28: Blighted Ovum")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x74; (GHIDRA_CAST((&DAT_00c805e0)))->msvc::string::string_from_cstr(GHIDRA_CAST("29: Teratoma")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x75; (GHIDRA_CAST((&DAT_00c805f8)))->msvc::string::string_from_cstr(GHIDRA_CAST("30: The Widow")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x76; (GHIDRA_CAST((&DAT_00c80610)))->msvc::string::string_from_cstr(GHIDRA_CAST("31: Mask of Infamy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x77; (GHIDRA_CAST((&DAT_00c80628)))->msvc::string::string_from_cstr(GHIDRA_CAST("32: Wretched")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x78; (GHIDRA_CAST((&DAT_00c80640)))->msvc::string::string_from_cstr(GHIDRA_CAST("33: Pin")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x79; (GHIDRA_CAST((&DAT_00c80658)))->msvc::string::string_from_cstr(GHIDRA_CAST("34: Conquest")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7a; (GHIDRA_CAST((&DAT_00c80670)))->msvc::string::string_from_cstr(GHIDRA_CAST("35: Daddy Long Legs")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7b; (GHIDRA_CAST((&DAT_00c80688)))->msvc::string::string_from_cstr(GHIDRA_CAST("36: Triachnid")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7c; (GHIDRA_CAST((&DAT_00c806a0)))->msvc::string::string_from_cstr(GHIDRA_CAST("37: The Haunt")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7d; (GHIDRA_CAST((&DAT_00c806b8)))->msvc::string::string_from_cstr(GHIDRA_CAST("38: Dingle")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7e; (GHIDRA_CAST((&DAT_00c806d0)))->msvc::string::string_from_cstr(GHIDRA_CAST("39: Mega Maw")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7f; (GHIDRA_CAST((&DAT_00c806e8)))->msvc::string::string_from_cstr(GHIDRA_CAST("40: Gate")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x80; (GHIDRA_CAST((&DAT_00c80700)))->msvc::string::string_from_cstr(GHIDRA_CAST("41: Mega Fatty")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x81; (GHIDRA_CAST((&DAT_00c80718)))->msvc::string::string_from_cstr(GHIDRA_CAST("42: Cage")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x82; (GHIDRA_CAST((&DAT_00c80730)))->msvc::string::string_from_cstr(GHIDRA_CAST("43: Mama Gurdy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x83; (GHIDRA_CAST((&DAT_00c80748)))->msvc::string::string_from_cstr(GHIDRA_CAST("44: Dark One")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x84; (GHIDRA_CAST((&DAT_00c80760)))->msvc::string::string_from_cstr(GHIDRA_CAST("45: Adversary")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x85; (GHIDRA_CAST((&DAT_00c80778)))->msvc::string::string_from_cstr(GHIDRA_CAST("46: Polycephalus")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x86; (GHIDRA_CAST((&DAT_00c80790)))->msvc::string::string_from_cstr(GHIDRA_CAST("47: Mr. Fred")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x87; (GHIDRA_CAST((&DAT_00c807a8)))->msvc::string::string_from_cstr(GHIDRA_CAST("48: Mega Satan")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x88; (GHIDRA_CAST((&DAT_00c807c0)))->msvc::string::string_from_cstr(GHIDRA_CAST("49: Gurgling")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x89; (GHIDRA_CAST((&DAT_00c807d8)))->msvc::string::string_from_cstr(GHIDRA_CAST("50: Stain")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8a; (GHIDRA_CAST((&DAT_00c807f0)))->msvc::string::string_from_cstr(GHIDRA_CAST("51: Brownie")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8b; (GHIDRA_CAST((&DAT_00c80808)))->msvc::string::string_from_cstr(GHIDRA_CAST("52: Forsaken")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8c; (GHIDRA_CAST((&DAT_00c80820)))->msvc::string::string_from_cstr(GHIDRA_CAST("53: Little Horn")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8d; (GHIDRA_CAST((&DAT_00c80838)))->msvc::string::string_from_cstr(GHIDRA_CAST("54: Rag Man")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8e; (GHIDRA_CAST((&DAT_00c80850)))->msvc::string::string_from_cstr(GHIDRA_CAST("55: Hush")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8f; (GHIDRA_CAST((&DAT_00c80868)))->msvc::string::string_from_cstr(GHIDRA_CAST("56: Dangle")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x90; (GHIDRA_CAST((&DAT_00c80880)))->msvc::string::string_from_cstr(GHIDRA_CAST("57: Turdling")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x91; (GHIDRA_CAST((&DAT_00c80898)))->msvc::string::string_from_cstr(GHIDRA_CAST("58: Frail")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x92; (GHIDRA_CAST((&DAT_00c808b0)))->msvc::string::string_from_cstr(GHIDRA_CAST("59: Rag Mega")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x93; (GHIDRA_CAST((&DAT_00c808c8)))->msvc::string::string_from_cstr(GHIDRA_CAST("60: Sisters Vis")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x94; (GHIDRA_CAST((&DAT_00c808e0)))->msvc::string::string_from_cstr(GHIDRA_CAST("61: Big Horn")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x56; _atexit(FUN_00b15630); _Init_thread_footer(&DAT_00c80320); uVar16 = extraout_ECX_06; } } FUN_00694040(&DAT_00c80328,&DAT_00c808f8,uVar16); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x95; uVar16 = extraout_ECX_00; if (*GHIDRA_CAST(((pIVar13->name)._buf + 4)) < DAT_00c808f8) { _Init_thread_header(&DAT_00c808f8); uVar16 = extraout_ECX_07; if (DAT_00c808f8 == -1) { (GHIDRA_CAST((&DAT_00c80900)))->msvc::string::string_from_cstr(GHIDRA_CAST("0:Treasure")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x96; (GHIDRA_CAST((&DAT_00c80918)))->msvc::string::string_from_cstr(GHIDRA_CAST("1:Shop")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x97; (GHIDRA_CAST((&DAT_00c80930)))->msvc::string::string_from_cstr(GHIDRA_CAST("2:Boss")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x98; (GHIDRA_CAST((&DAT_00c80948)))->msvc::string::string_from_cstr(GHIDRA_CAST("3:Devil")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x99; (GHIDRA_CAST((&DAT_00c80960)))->msvc::string::string_from_cstr(GHIDRA_CAST("4:Angel")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9a; (GHIDRA_CAST((&DAT_00c80978)))->msvc::string::string_from_cstr(GHIDRA_CAST("5:Secret")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9b; (GHIDRA_CAST((&DAT_00c80990)))->msvc::string::string_from_cstr(GHIDRA_CAST("6:Library")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9c; (GHIDRA_CAST((&DAT_00c809a8)))->msvc::string::string_from_cstr(GHIDRA_CAST("7:Challenge")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9d; (GHIDRA_CAST((&DAT_00c809c0)))->msvc::string::string_from_cstr(GHIDRA_CAST("8:Golden_Chest")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9e; (GHIDRA_CAST((&DAT_00c809d8)))->msvc::string::string_from_cstr(GHIDRA_CAST("9:Red_Chest")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9f; (GHIDRA_CAST((&DAT_00c809f0)))->msvc::string::string_from_cstr(GHIDRA_CAST("10:Beggar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa0; (GHIDRA_CAST((&DAT_00c80a08)))->msvc::string::string_from_cstr(GHIDRA_CAST("11:Demon_Beggar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa1; (GHIDRA_CAST((&DAT_00c80a20)))->msvc::string::string_from_cstr(GHIDRA_CAST("12:Curse")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa2; (GHIDRA_CAST((&DAT_00c80a38)))->msvc::string::string_from_cstr(GHIDRA_CAST("13:Key_Master")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa3; (GHIDRA_CAST((&DAT_00c80a50)))->msvc::string::string_from_cstr(GHIDRA_CAST("14:Boss_Rush")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa4; (GHIDRA_CAST((&DAT_00c80a68)))->msvc::string::string_from_cstr(GHIDRA_CAST("15:Dungeon")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x95; _atexit(FUN_00b15610); _Init_thread_footer(&DAT_00c808f8); uVar16 = extraout_ECX_08; } } FUN_00694040(&DAT_00c80900,&DAT_00c80a80,uVar16); pEVar14 = local_1bc; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa5; omnicompleteText = (basic_string,msvc::allocator_> *)&local_1bc->anm2Path; do { FUN_0040c2f0(); } while (extraout_EDX != 1); string_split(words,GHIDRA_CAST(&(pEVar14->name)._size),0x20); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); iVar3 = FUN_00414410(); if ((*GHIDRA_CAST(&local_1bc->isBoss) == 0) || (pcVar4 = GHIDRA_CAST(FUN_004170e0(*GHIDRA_CAST(&local_1bc->isBoss) + -1)), *pcVar4 == ' ')) { iVar3 = iVar3 + 1; } if (iVar3 == 1) { listNode = GHIDRA_CAST(*commandNames); if (listNode != commandNames) { do { iVar3 = FUN_00414410(); if (iVar3 == 0) { LAB_00687925: FUN_00651af0(listNode + 2); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar16 = FUN_004143f0(0); iVar3 = FUN_00693650(uVar16,0); if (iVar3 == 0) goto LAB_00687925; } listNode = GHIDRA_CAST(*listNode); } while (listNode != commandNames); } goto LAB_00689dd6; } if (iVar3 < 2) goto LAB_00689dd6; psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST(&DAT_00b65804)); if (bVar1 != 0) { local_1e0 = g_manager; pIVar13 = (g_manager->_entityConfig)._entities._head; local_1c4 = GHIDRA_CAST(pIVar13->type); if (local_1c4 != pIVar13) { do { pEVar14 = GHIDRA_CAST(&(local_1c4->name)._size); local_1bc = pEVar14; cVar2 = FUN_00685fa0(); if (cVar2 != '\0') { pIVar13 = GHIDRA_CAST(0x1); local_1dc = GHIDRA_CAST(0x1); iVar3 = FUN_00414410(); if (iVar3 == 2) { bVar1 = 0x2e; psVar5 = GHIDRA_CAST(FUN_004143f0(1)); string_split(&rooms,psVar5,bVar1); uVar11 = FUN_00414410(); if (1 < uVar11) { iVar3 = FUN_00499330(); pIVar13 = GHIDRA_CAST((iVar3 + 1)); local_1dc = pIVar13; } msvc::vector::_Tidy(); } local_1e4 = GHIDRA_CAST(0x0); if (0 < GHIDRA_INT(pIVar13)) { do { if ((GHIDRA_INT(pIVar13) < 2) && (pEVar14->subtype == 0)) { sprintf_s(entryIdText,0x20,GHIDRA_CAST("%d.%d")); } else { sprintf_s(entryIdText,0x20,GHIDRA_CAST("%d.%d.%d")); } (GHIDRA_CAST((local_194._buf)))->msvc::string::string_from_cstr(entryIdText); tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa8); uVar11 = FUN_00414410(); if (1 < uVar11) { uVar16 = FUN_004143f0(1); FUN_0040c310(uVar16); uVar11 = FUN_00414410(); if (2 < uVar11) { uVar12 = 2; uVar11 = FUN_00414410(); if (2 < uVar11) { do { uVar16 = FUN_004143f0(uVar12); FUN_00421620(&DAT_00b656ec); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa9; uVar16 = FUN_00651d50(uVar16); FUN_004215a0(uVar16); (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa8); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; uVar11 = FUN_00414410(); } while (uVar12 < uVar11); } pEVar14 = local_1bc; } puVar6 = GHIDRA_CAST(FUN_00684e50(local_204)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) tmpString); uVar15 = FUN_00684e50(local_1fc); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); } (GHIDRA_CAST((pEVar14)))->EntityConfig_Entity::GetName(&local_6c,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xaa; (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string(&local_6c); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xab); puVar6 = GHIDRA_CAST(FUN_00684e50(local_1f4)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_6c); uVar15 = FUN_00684e50(local_1d0); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00687c54: (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if ((iVar3 == 0) || (iVar3 = FUN_00693650(tmpString,0), iVar3 != -1)) goto LAB_00687c54; } (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_6c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); local_1e4 = GHIDRA_CAST((GHIDRA_INT(&local_1e4->id) + 1)); pIVar13 = local_1dc; } while (GHIDRA_INT(local_1e4) < GHIDRA_INT(local_1dc)); } } msvc:: _Tree_unchecked_const_iterator_>,msvc::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,msvc::_Iterator_base0> *)&local_1c4); } while (local_1c4 != (local_1e0->_entityConfig)._entities._head); } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("delirious")); if (bVar1 == 0) { if (iVar3 != 2) { if (iVar3 < 2) { LAB_00689a8a: if (iVar3 < 2) goto LAB_00689dd6; LAB_00689a90: psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("metro")); if (bVar1 != 0) { itemConfig = &g_manager->_itemConfig; local_1bc = GHIDRA_CAST(0x0); if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2 != 0) { do { pEVar14 = local_1bc; pMVar9 = GHIDRA_CAST((GHIDRA_CAST((itemConfig)))->ItemConfig)::GetCollectible(GHIDRA_INT(local_1bc)); local_1e0 = pMVar9; if (pMVar9 != GHIDRA_CAST(0x0)) { sprintf_s(idText,0x20,&DAT_00b66204); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(idText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd4; uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00689d47: psVar5 = ItemConfig_Item::GetLocalizedName (GHIDRA_CAST(pMVar9),&displayName,0); (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_00689d47; freeBlock = (void *)FUN_004143f0(1); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::string(freeBlock); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd5); uVar11 = FUN_00414410(); if (2 < uVar11) { uVar12 = 2; uVar11 = FUN_00414410(); if (2 < uVar11) { do { uVar16 = FUN_004143f0(uVar12); FUN_00421620(&DAT_00b656ec); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd6; uVar16 = FUN_00651d50(uVar16); FUN_004215a0(uVar16); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd5); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; uVar11 = FUN_00414410(); } while (uVar12 < uVar11); } pEVar14 = local_1bc; } puVar6 = GHIDRA_CAST(FUN_00684e50(&local_1e8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) tmpString); uVar15 = FUN_00684e50(local_1f0); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); (GHIDRA_CAST((GHIDRA_CAST(local_1e0))))->ItemConfig_Item::GetLocalizedName(&local_194,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd7; (GHIDRA_CAST((local_1ac)))->msvc::string::string(&local_194); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd8; puVar6 = GHIDRA_CAST(FUN_00684e50(local_1f8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_194); uVar15 = FUN_00684e50(local_200); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { (GHIDRA_CAST((local_1ac)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator= (GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); } local_1bc = GHIDRA_CAST((GHIDRA_INT(&pEVar14->id) + 1)); itemConfig = &g_manager->_itemConfig; } while (local_1bc < (EntityConfig_Entity *) (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2)); } } } else { LAB_00688ee4: psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("giveitem")); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66178); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("remove")); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b6617c); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("giveitem2")); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66160); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("remove2")); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b6616c); if (bVar1 == 0) { if (iVar3 != 2) goto LAB_00689a8a; psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("combo")); if (bVar1 != 0) { uVar11 = FUN_00414410(); if (uVar11 < 2) { uVar11 = 0; iVar3 = FUN_00414410(); if (iVar3 != 0) { do { uVar16 = FUN_004143f0(uVar11); FUN_00651af0(uVar16); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); uVar11 = uVar11 + 1; uVar12 = FUN_00414410(); } while (uVar11 < uVar12); } } else { bVar1 = 0x2e; psVar5 = GHIDRA_CAST(FUN_004143f0(1)); string_split(&rooms,psVar5,bVar1); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd2); iVar3 = FUN_00414410(); if (((iVar3 != 0) && (uVar11 = FUN_00414410(), uVar11 < 2)) && (iVar3 = FUN_004143f0(0), *GHIDRA_CAST((iVar3 + 0x10)) != 0)) { pcVar4 = GHIDRA_CAST(FUN_004143f0(0)); pbVar10 = (GHIDRA_CAST((pcVar4)))->msvc::string::c_str(); iVar3 = atoi(GHIDRA_CAST(pbVar10)); if ((-1 < iVar3) && (iVar8 = FUN_00414410(), iVar3 < iVar8)) { uVar16 = FUN_004143f0(iVar3); FUN_00651af0(uVar16); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); msvc::vector::_Tidy(); } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("cutscene")); if (bVar1 != 0) { uVar11 = 1; pcVar4 = &(*GHIDRA_CAST((GHIDRA_CAST(&((g_manager->_cutsceneManager))) + 0x54))); do { sprintf_s(idText,0x20,&DAT_00b66130); (GHIDRA_CAST((local_1ac)))->msvc::string::string_from_cstr(idText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd3); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00689197: (GHIDRA_CAST((pcVar4)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator= (GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_00689197; } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); uVar11 = uVar11 + 1; pcVar4 = pcVar4 + 0x4c; } while (uVar11 < 0x1b); goto LAB_00689dd6; } goto LAB_00689a90; } } } } } } } } itemConfig = &g_manager->_itemConfig; local_1bc = GHIDRA_CAST(0x0); pMVar9 = g_manager; if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2 != 0) { do { pEVar14 = local_1bc; local_1c4 = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(GHIDRA_INT(local_1bc)); if (local_1c4 != GHIDRA_CAST(0x0)) { sprintf_s(entryIdText,0x20,&DAT_00b66204); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(entryIdText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc4; uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_006894b9: psVar5 = (GHIDRA_CAST((local_1c4)))->ItemConfig_Item::GetLocalizedName(&displayName,0); (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006894b9; freeBlock = (void *)FUN_004143f0(1); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::string(freeBlock); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xc5); uVar11 = FUN_00414410(); if (2 < uVar11) { uVar12 = 2; uVar11 = FUN_00414410(); if (2 < uVar11) { do { uVar16 = FUN_004143f0(uVar12); FUN_00421620(&DAT_00b656ec); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc6; uVar16 = FUN_00651d50(uVar16); FUN_004215a0(uVar16); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xc5); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; uVar11 = FUN_00414410(); } while (uVar12 < uVar11); } pEVar14 = local_1bc; } puVar6 = GHIDRA_CAST(FUN_00684e50(&local_1e8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) tmpString); uVar15 = FUN_00684e50(local_1f0); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); psVar5 = (GHIDRA_CAST((local_1c4)))->ItemConfig_Item::GetLocalizedName(&displayName,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 199; pbVar10 = (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); (GHIDRA_CAST((local_194._buf)))->msvc::string::string_from_cstr(pbVar10); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc9; (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_1ac)))->msvc::string::string(&local_194); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xca; puVar6 = GHIDRA_CAST(FUN_00684e50(local_1f8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_194); uVar15 = FUN_00684e50(local_200); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { (GHIDRA_CAST((local_1ac)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); pMVar9 = g_manager; } itemConfig = &pMVar9->_itemConfig; local_1bc = GHIDRA_CAST((GHIDRA_INT(pEVar14) + 1)); } while (local_1bc < GHIDRA_UINT((GHIDRA_INT((pMVar9->_itemConfig)._collectibles._end) - GHIDRA_INT((itemConfig->_collectibles)._begin) >> 2))); } local_1bc = GHIDRA_CAST(0x0); if (GHIDRA_INT((pMVar9->_itemConfig)._trinkets._end) - GHIDRA_INT((pMVar9->_itemConfig)._trinkets._begin) >> 2 != 0) { do { pEVar14 = local_1bc; local_1c4 = (GHIDRA_CAST((&pMVar9->_itemConfig)))->ItemConfig::GetTrinket(GHIDRA_UINT(local_1bc)); if (local_1c4 != GHIDRA_CAST(0x0)) { sprintf_s(idText,0x20,&DAT_00b66208); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::string_from_cstr(idText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xcb; uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_006897e1: psVar5 = (GHIDRA_CAST((local_1c4)))->ItemConfig_Item::GetLocalizedName(&displayName,0); (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006897e1; freeBlock = (void *)FUN_004143f0(1); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::string(freeBlock); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xcc); uVar11 = FUN_00414410(); if (2 < uVar11) { uVar12 = 2; uVar11 = FUN_00414410(); if (2 < uVar11) { do { uVar16 = FUN_004143f0(uVar12); FUN_00421620(&DAT_00b656ec); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xcd; uVar16 = FUN_00651d50(uVar16); FUN_004215a0(uVar16); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xcc); (GHIDRA_CAST((local_6c._buf)))->msvc::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; uVar11 = FUN_00414410(); } while (uVar12 < uVar11); } pEVar14 = local_1bc; } puVar6 = GHIDRA_CAST(FUN_00684e50(&local_1e8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) tmpString); uVar15 = FUN_00684e50(local_1f0); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); (GHIDRA_CAST((local_1c4)))->ItemConfig_Item::GetLocalizedName(&local_194,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xce; (GHIDRA_CAST((local_1ac)))->msvc::string::string(&local_194); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xcf; puVar6 = GHIDRA_CAST(FUN_00684e50(local_1f8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_194); uVar15 = FUN_00684e50(local_200); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); iVar3 = FUN_00693650(tmpString,0); if (iVar3 != -1) { (GHIDRA_CAST((local_1ac)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::_Tidy_deallocate(); pMVar9 = g_manager; } local_1bc = GHIDRA_CAST((GHIDRA_INT(&pEVar14->id) + 1)); } while (local_1bc < (EntityConfig_Entity *) (GHIDRA_INT((pMVar9->_itemConfig)._trinkets._end) - GHIDRA_INT((pMVar9->_itemConfig)._trinkets._begin) >> 2)); } uVar11 = 0; if (GHIDRA_INT((pMVar9->_itemConfig)._pillEffects._end) - GHIDRA_INT((pMVar9->_itemConfig)._pillEffects._begin) >> 2 != 0) { do { sprintf_s(pillIdText,0x20,&DAT_00b6620c); (GHIDRA_CAST((local_1ac)))->msvc::string::string_from_cstr(pillIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd0); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006898e4: freeBlock = (GHIDRA_CAST((&g_manager->_itemConfig)))->Config::GetPillEffect(uVar11); psVar5 = (GHIDRA_CAST((freeBlock)))->PocketItemConfig::GetName(&displayName,0); (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006898e4; } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); uVar11 = uVar11 + 1; pMVar9 = g_manager; } while (uVar11 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._pillEffects._end) - GHIDRA_INT((g_manager->_itemConfig)._pillEffects._begin) >> 2))); } uVar11 = 0; if (GHIDRA_INT((pMVar9->_itemConfig)._cards._end) - GHIDRA_INT((pMVar9->_itemConfig)._cards._begin) >> 2 != 0) { do { sprintf_s(cardIdText,0x20,&DAT_00b66210); (GHIDRA_CAST((local_194._buf)))->msvc::string::string_from_cstr(cardIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd1); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006899ea: cardConfig = (GHIDRA_CAST((&g_manager->_itemConfig)))->ItemConfig::GetCard(uVar11); psVar5 = (GHIDRA_CAST((cardConfig)))->PocketItemConfig::GetName(&displayName,0); (GHIDRA_CAST((psVar5->_buf)))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006899ea; } local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); uVar11 = uVar11 + 1; } while (uVar11 < GHIDRA_UINT((GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT((g_manager->_itemConfig)._cards._begin) >> 2))); } } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b6580c); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("forceroom")); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("stage")); if (bVar1 != 0) { bVar1 = (GHIDRA_CAST((g_game)))->Game::IsGreedMode(); uVar11 = 1; if (bVar1 == 0) { do { sprintf_s(stageIdText,0x10,&DAT_00b66130); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(stageIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbd); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006883e6: FUN_00651af0(entryText); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,0,-1); psVar5 = RoomConfig::GetStageDisplayName (&game->_roomConfig,&displayName,uVar12,language_00); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xbe; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbd); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006883e6; } sprintf_s(stageIdText,0x10,&DAT_00b66138); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::string_from_cstr(stageIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbf); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006884a9: FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,1,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc0; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbf); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (((iVar3 == 0) && (uVar11 != 9)) && (uVar11 != 0xc)) goto LAB_006884a9; } sprintf_s(stageIdText,0x10,&DAT_00b6613c); SimpleString::operator=(GHIDRA_CAST(tmpString),GHIDRA_CAST(stageIdText)); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_0068855f: if (uVar11 < 9) { FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,2,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc1; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbf); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_0068855f; } sprintf_s(stageIdText,0x10,&DAT_00b66170); SimpleString::operator=(GHIDRA_CAST(tmpString),GHIDRA_CAST(stageIdText)); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_0068861a: if (uVar11 < 9) { FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,4,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc2; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbf); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_0068861a; } sprintf_s(stageIdText,0x10,&DAT_00b66174); SimpleString::operator=(GHIDRA_CAST(tmpString),GHIDRA_CAST(stageIdText)); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006886d5: if (uVar11 < 7) { FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,5,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc3; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xbf); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_006886d5; } (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); uVar11 = uVar11 + 1; } while (uVar11 < 0xe); } else { do { sprintf_s(stageIdText,0x10,&DAT_00b66130); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string_from_cstr(stageIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xb8); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00688186: FUN_00651af0(entryText); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,0,-1); psVar5 = RoomConfig::GetStageDisplayName (&game->_roomConfig,&displayName,uVar12,language); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb9; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xb8); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if (iVar3 == 0) goto LAB_00688186; } sprintf_s(stageIdText,0x10,&DAT_00b66138); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::string_from_cstr(stageIdText); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xba); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_00688244: FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,1,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xbb; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xba); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if ((iVar3 == 0) && (uVar11 < 6)) goto LAB_00688244; } sprintf_s(stageIdText,0x10,&DAT_00b6613c); SimpleString::operator=(GHIDRA_CAST(tmpString),GHIDRA_CAST(stageIdText)); uVar12 = FUN_00414410(); if (uVar12 < 2) { LAB_006882ff: FUN_00651af0(tmpString); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); game = g_game; uVar12 = RoomConfig::GetStageID(uVar11,2,-1); psVar5 = (GHIDRA_CAST((&game->_roomConfig)))->RoomConfig::GetStageDisplayName(&displayName,uVar12,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xbc; FUN_00651af0(psVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xba); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if ((iVar3 == 0) && (uVar11 < 6)) goto LAB_006882ff; } (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); uVar11 = uVar11 + 1; } while (uVar11 < 8); } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("gridspawn")); if (bVar1 != 0) { listNode = GHIDRA_CAST(*gridEntityNames); if (listNode != gridEntityNames) { do { uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_006887c6: FUN_00651af0(listNode + 2); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,0); if (iVar3 == 0) goto LAB_006887c6; } listNode = GHIDRA_CAST(*listNode); } while (listNode != gridEntityNames); } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("debug")); if (bVar1 != 0) { listNode = GHIDRA_CAST(*debugFlagNames); if (listNode != debugFlagNames) { do { uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00688846: FUN_00651af0(listNode + 2); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,0); if (iVar3 == 0) goto LAB_00688846; } listNode = GHIDRA_CAST(*listNode); } while (listNode != debugFlagNames); } goto LAB_00689dd6; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,GHIDRA_CAST("curse")); if (bVar1 != 0) { listNode = GHIDRA_CAST(*curseNames); if (listNode != curseNames) { do { uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_006888c6: FUN_00651af0(listNode + 2); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,0); if (iVar3 == 0) goto LAB_006888c6; } listNode = GHIDRA_CAST(*listNode); } while (listNode != curseNames); } goto LAB_00689dd6; } goto LAB_00688ee4; } } uVar11 = FUN_00414410(); if (uVar11 < 2) { SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"s#d#x"); goto LAB_00689dd6; } bVar1 = 0x2e; psVar5 = GHIDRA_CAST(FUN_004143f0(1)); string_split(local_6c._buf + 0xc,psVar5,bVar1); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb1; iVar3 = FUN_00414410(); FUN_004143f0(1); iVar8 = FUN_004143f0(1); pcVar4 = GHIDRA_CAST(FUN_004170e0(*GHIDRA_CAST((iVar8 + 0x10)) + -1)); if (*pcVar4 == '.') { iVar3 = iVar3 + 1; } if (iVar3 == 2) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66140); if (bVar1 != 0) { roomConfig = &g_game->_roomConfig; uVar15 = FUN_0042a020(); uVar11 = (GHIDRA_CAST((GHIDRA_CAST(((uint64_t)uVar15 >> 0x20)))))->Game::GetStageID(unused); RoomConfig::CollectRooms (roomConfig,&rooms,uVar11,1,0xd,0,0xffffffff,1,10,GHIDRA_CAST(uVar15),-1,-1); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb2; pIVar13 = GHIDRA_CAST(0xffffffff); maxRoomVariant = GHIDRA_CAST(0x0); local_1c4 = GHIDRA_CAST(0xffffffff); local_1dc = GHIDRA_CAST(0x0); local_1e4 = rooms; if (rooms != roomsEnd) { do { roomVariantPtr = GHIDRA_CAST((local_1e4->id + 0xc)); roomVariant = *roomVariantPtr; ppIVar7 = &local_1c4; if (roomVariant < pIVar13) { ppIVar7 = roomVariantPtr; } pIVar13 = *ppIVar7; ppIVar7 = &local_1dc; if (maxRoomVariant < roomVariant) { ppIVar7 = roomVariantPtr; } local_1c4 = pIVar13; maxRoomVariant = *ppIVar7; local_1dc = maxRoomVariant; FUN_005cbb80(local_1d0,roomVariant); } while (local_1e4 != roomsEnd); } sprintf_s(idText,0x20,GHIDRA_CAST("%u..%u")); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(idText)); goto LAB_00688ec2; } psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b6614c); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66150); if (bVar1 == 0) goto LAB_00688ecd; } listNode = GHIDRA_CAST(*roomTypeNames); if (listNode != roomTypeNames) { do { uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00688ad6: FUN_00651af0(listNode + 2); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,0); if (iVar3 == 0) goto LAB_00688ad6; } listNode = GHIDRA_CAST(*listNode); } while (listNode != roomTypeNames); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); msvc::vector::_Tidy(); goto LAB_00689dd6; } } else if (iVar3 == 3) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b6614c); if (bVar1 == 0) { psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66150); if (bVar1 == 0) goto LAB_00688ecd; } game = g_game; doorMask = GHIDRA_CAST(FUN_0042a020()); psVar5 = GHIDRA_CAST(FUN_004143f0(1)); local_1e0 = GHIDRA_CAST(RoomConfig)::GetStageIdByName(psVar5); psVar5 = GHIDRA_CAST(FUN_004143f0(0)); bVar1 = str_eq_cstr(psVar5,&DAT_00b66150); if (bVar1 == 0) { uVar11 = 0; } else { uVar11 = (GHIDRA_CAST((g_game)))->Game::GetStageID(unused_00); } RoomConfig::CollectRooms (&game->_roomConfig,&rooms,uVar11,GHIDRA_INT(local_1e0),0xd,0,0xffffffff,1,10,doorMask,-1, -1); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb3; local_1bc = rooms; pEVar14 = rooms; if (rooms != roomsEnd) { do { sprintf_s(roomIdText,0x10,&DAT_00b66130); (GHIDRA_CAST((local_1ac)))->msvc::string::string_from_cstr(roomIdText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb4; uVar11 = FUN_00414410(); uVar16 = extraout_ECX_01; if (uVar11 < 3) { LAB_00688d78: FUN_005cbb80(&local_1dc,uVar16); pEVar14 = local_1bc; } else { uVar17 = 0; uVar16 = FUN_004143f0(2); iVar3 = FUN_00693650(uVar16,uVar17); uVar16 = extraout_ECX_02; if (iVar3 == 0) goto LAB_00688d78; freeBlock = (void *)FUN_004143f0(2); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string(freeBlock); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb5; puVar6 = GHIDRA_CAST(FUN_00684e50(local_1d0)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end(entryText); uVar15 = FUN_00684e50(local_1f4); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); (GHIDRA_CAST((local_194._buf)))->msvc::string::string((void *)(pEVar14->id + 0x14)); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb6; puVar6 = GHIDRA_CAST(FUN_00684e50(local_1fc)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)&local_194 ); uVar15 = FUN_00684e50(local_204); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); iVar3 = FUN_00693650(entryText,0); if (iVar3 == -1) { puVar6 = (uint32_t *) msvc::vector_>::erase ((vector_> *)&rooms,&local_1c4,pEVar14); local_1bc = GHIDRA_CAST(*puVar6); } else { FUN_005cbb80(&local_1dc,extraout_ECX_03); } pEVar14 = local_1bc; (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb3; (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); } while (pEVar14 != roomsEnd); } iVar3 = GHIDRA_INT(roomsEnd) - GHIDRA_INT(rooms); local_194._size = 0; local_194._capacity = 0xf; local_194._buf[0] = '\0'; local_194._buf[1] = '\0'; local_194._buf[2] = '\0'; local_194._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb7; local_1bc = rooms; if (rooms != roomsEnd) { do { pEVar14 = local_1bc; if (((GHIDRA_UINT((iVar3 >> 2)) < 8) || (*GHIDRA_CAST((local_1bc->id + 0x24)) == 0)) || (cVar2 = FUN_0040c790(), cVar2 == '\0')) { FUN_0040c310(pEVar14->id + 0x14); sprintf_s(roomIdText,0x10,&DAT_00b66130); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(roomIdText)); if (*GHIDRA_CAST((pEVar14->id + 0x24)) != 0) { SimpleString::operator=(GHIDRA_CAST(omnicompleteText),":"); FUN_00651af0(pEVar14->id + 0x14); } SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); FUN_005cbb80(local_1d0,extraout_ECX_04); } else { puVar6 = (uint32_t *) msvc::vector_>::erase ((vector_> *)&rooms,&local_1e8,pEVar14); local_1bc = GHIDRA_CAST(*puVar6); } } while (local_1bc != roomsEnd); } (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); LAB_00688ec2: FID_conflict__Tidy(&rooms); } LAB_00688ecd: local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); msvc::vector::_Tidy(); goto LAB_00689dd6; } local_1bc = GHIDRA_CAST(0x0); do { pEVar14 = local_1bc; sprintf_s(idText,0x20,GHIDRA_CAST("%d.%d")); (GHIDRA_CAST((local_194._buf)))->msvc::string::string_from_cstr(idText); tmpStringSize = 0; tmpStringCapacity = 0xf; tmpString[0] = (void *)0x0; local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xad); uVar11 = FUN_00414410(); if (1 < uVar11) { uVar16 = FUN_004143f0(1); FUN_0040c310(uVar16); uVar11 = FUN_00414410(); if (2 < uVar11) { uVar12 = 2; uVar11 = FUN_00414410(); if (2 < uVar11) { do { uVar16 = FUN_004143f0(uVar12); FUN_00421620(&DAT_00b656ec); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xae; uVar16 = FUN_00651d50(uVar16); FUN_004215a0(uVar16); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xad); (GHIDRA_CAST((local_1ac)))->msvc::string::_Tidy_deallocate(); uVar12 = uVar12 + 1; uVar11 = FUN_00414410(); } while (uVar12 < uVar11); } pEVar14 = local_1bc; } puVar6 = GHIDRA_CAST(FUN_00684e50(&local_1e8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)tmpString); uVar15 = FUN_00684e50(local_1f0); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); } entityConfigEntry = EntityConfig::GetEntity (&g_manager->_entityConfig,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pEVar14[0x8ad6])) + 0x90)))), *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pEVar14[0x8ad6])) + 0x94)))),0); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::string_from_cstr(GHIDRA_CAST("unknown")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xaf; if (entityConfigEntry != GHIDRA_CAST(0x0)) { psVar5 = (GHIDRA_CAST((entityConfigEntry)))->EntityConfig_Entity::GetName(&displayName,0); FUN_004215a0(psVar5); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); } (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::string(local_164); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xb0); puVar6 = GHIDRA_CAST(FUN_00684e50(local_1f8)); uVar16 = *puVar6; msvc::basic_string,msvc::allocator_>::end(local_164); uVar15 = FUN_00684e50(local_200); FUN_00693eb0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20)),uVar16); uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00687f92: (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::c_str(); sprintf_s(completionEntry,0x80,GHIDRA_CAST("%s:%s")); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),GHIDRA_CAST(completionEntry)); SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"#"); } else { uVar17 = 0; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,uVar17); if ((iVar3 == 0) || (iVar3 = FUN_00693650(tmpString,0), iVar3 != -1)) goto LAB_00687f92; } (GHIDRA_CAST((GHIDRA_CAST(entryText))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(local_164))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(tmpString))))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa6); (GHIDRA_CAST((local_194._buf)))->msvc::string::_Tidy_deallocate(); local_1bc = GHIDRA_CAST(((pEVar14->name)._buf + 4)); } while (local_1bc < GHIDRA_CAST(0x3b0)); uVar11 = FUN_00414410(); if (uVar11 < 2) { LAB_00688069: local_1bd = '\x01'; } else { (GHIDRA_CAST((displayName._buf)))->msvc::string::string_from_cstr(&DAT_00b660ec); cleanupFlags = 1; uVar16 = FUN_004143f0(1); iVar3 = FUN_00693650(uVar16,0); local_1bd = '\0'; if (iVar3 != -1) goto LAB_00688069; } if ((cleanupFlags & 1) != 0) { cleanupFlags = cleanupFlags & 0xfffffffe; (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); } if (local_1bd != '\0') { SimpleString::operator=(GHIDRA_CAST(omnicompleteText),"kill#"); } LAB_00689dd6: font = GHIDRA_CAST(FUN_006867b0()); string_split(omnicompleteEntries,GHIDRA_CAST(omnicompleteText),0x23); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd9); uVar11 = 0; local_1d1 = 0x20; local_1d2 = 0x23; local_1c4 = GHIDRA_CAST(0x6); LAB_00689e10: FUN_0040c2f0(); do { uVar12 = FUN_00414410(); if (uVar11 < uVar12) { uVar16 = FUN_004143f0(uVar11); pcVar4 = GHIDRA_CAST(FUN_00694120(uVar16)); cleanupFlags = cleanupFlags | 2; pbVar10 = (GHIDRA_CAST((pcVar4)))->msvc::string::c_str(); iVar3 = Font::GetStringWidth(font,pbVar10); local_1bd = '\x01'; if (g_screenWidth - 20.0 < (float)iVar3) goto LAB_00689e7f; } else { LAB_00689e7f: local_1bd = '\0'; } if ((cleanupFlags & 2) != 0) { cleanupFlags = cleanupFlags & 0xfffffffd; (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); } if (local_1bd == '\0') break; FUN_004143f0(uVar11); uVar11 = uVar11 + 1; uVar16 = FUN_00421620(&DAT_00b66110); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xda; FUN_00651af0(uVar16); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xd9); (GHIDRA_CAST((displayName._buf)))->msvc::string::_Tidy_deallocate(); } while( true ); msvc::basic_string,msvc::allocator_>::end(omnicompleteText); uVar15 = FUN_00684e50(local_1d0); FUN_006851c0(*GHIDRA_CAST(uVar15),GHIDRA_INT(((uint64_t)uVar15 >> 0x20))); omnicompleteText = omnicompleteText + 0x18; local_1c4 = GHIDRA_CAST((GHIDRA_INT(&local_1c4[-1]._initCharge) + 3)); if (local_1c4 == GHIDRA_CAST(0x0)) { msvc::vector::_Tidy(); msvc::vector::_Tidy(); msvc::vector::_Tidy(); msvc::vector::_Tidy(); FUN_00693420(); FUN_00693420(); FUN_00693420(); FUN_00693420(); FUN_00693420(); ExceptionList = local_10; return; } goto LAB_00689e10; } // 0068b260 void Console::Update() { Console *pCVar1; char cVar2; char isRightAltDown; uint8_t isCallbackHandled; uint32_t uVar3; int *scrollPos; int *piVar4; uint32_t *puVar5; uint8_t *puVar6; uint32_t *extraout_EAX; char *pasteBase; int historyContainer; int *piVar7; int iVar8; int unused; int extraout_ECX; int extraout_ECX_00; char *textEnd; uint32_t uVar9; uint32_t uVar10; uint8_t *puVar11; tagINPUT keyInput; uint32_t visibleRange; char *local_28; uint32_t *local_24; int *keyboard; char *clipboardText; int lineStart; uint8_t isOpenPressed; void *local_10; uint8_t *puStack_c; uint32_t local_8; void *glfwWindow; bool isCtrlHeld; bool isPastRange; Manager *manager; local_8 = 0xffffffff; puStack_c = &LAB_00af8edd; local_10 = ExceptionList; ExceptionList = &local_10; local_28 = GHIDRA_CAST(0x155); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74)) (0,FUN_00a20730,&local_28,0,0,__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); local_28 = GHIDRA_CAST(0x15a); isRightAltDown = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a20730,&local_28,0,0); if ((((DAT_00c7ec61 != '\0') && (DAT_00c7ec60 != '\0')) && (cVar2 != '\0')) && (isRightAltDown == '\0')) { keyInput.type = 1; keyInput.field1_0x4.mi.dx = 0x11; keyInput.field1_0x4.mi.mouseData = 0; keyInput.field1_0x4.mi.dwFlags = 0; keyInput.field1_0x4.mi.dy = 2; SendInput(1,&keyInput,0x1c); (**(code **)(PTR_vftable_00c57b18 + 0x28))(&keyboard,0); local_8 = 0; if (keyboard != GHIDRA_CAST(0x0)) { (**(code **)(*keyboard + 0x40))(0x155,0); } local_8 = 0xffffffff; cVar2 = '\0'; FUN_004242b0(); } DAT_00c7ec60 = isRightAltDown; DAT_00c7ec61 = cVar2; if (*GHIDRA_CAST(this) == 0) { if (g_manager->_netplayManager != *GHIDRA_CAST((g_manager + 1))) { ExceptionList = local_10; return; } if (((g_game != GHIDRA_CAST(0x0)) && ((g_game->_dailyChallenge)._id != 0)) && ((g_game->_dailyChallenge)._isPractice == 0)) { ExceptionList = local_10; return; } if ((g_manager->_optionsConfig)._enableDebugConsole == 0) { ExceptionList = local_10; return; } if (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) != 2) || (g_luaEngine == (void *)0x0)) || (isCallbackHandled = lua_run_input_action_callback(GHIDRA_CAST(0x0),1,0x21,&isOpenPressed), isCallbackHandled == 0)) { local_28 = GHIDRA_CAST(0x60); isOpenPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_28,0,0); } glfwWindow = g_glfwWindow; if (isOpenPressed == 0) { ExceptionList = local_10; return; } if (DAT_00c7ec62 == '\0') { if (g_glfwWindow == (void *)0x0) { _wassert(L"window != NULL", L"C:\\nicalis\\builderbob\\projects\\KAGE\\Source\\Platforms\\PC\\Shared\\Source\\External\\gl\\GLFW_3.4\\src\\input.c" ,0x3bf); } if (_glfw == 0) { _glfwInputError(0x10001,0); } else { *(code **)(GHIDRA_CAST(glfwWindow) + 0x2a8) = FUN_00686730; } DAT_00c7ec62 = '\x01'; } if (*GHIDRA_CAST(this) != 0) { ExceptionList = local_10; return; } iVar8 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))); *GHIDRA_CAST(this) = 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x1)))) = 0; if ((iVar8 == 0) || (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { uVar3 = 0; } else { uVar3 = 1; } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = uVar3; manager = g_manager; *GHIDRA_CAST((this + 4)) = 0; manager->_isHotkeysEnabled = 0; ExceptionList = local_10; return; } if (*GHIDRA_CAST(this) != 2) { ExceptionList = local_10; return; } local_28 = GHIDRA_CAST(0x155); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_28,0,0); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x157); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_28,0,0); if (cVar2 != '\0') goto LAB_0068b552; local_28 = GHIDRA_CAST(0x159); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_28,0,0); if (cVar2 != '\0') goto LAB_0068b552; isCtrlHeld = false; } else { LAB_0068b552: isCtrlHeld = true; } cVar2 = FUN_00686ad0(0x10a); if (cVar2 == '\0') { cVar2 = FUN_00686ad0(0x10b); if (cVar2 != '\0') { pCVar1 = this + 4; *GHIDRA_CAST(pCVar1) = *GHIDRA_CAST(pCVar1) + -1; if (*GHIDRA_CAST(pCVar1) < 0) { iVar8 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) + -1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = iVar8; if ((-1 < iVar8) && (iVar8 < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))))) { local_28 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))); *GHIDRA_CAST((this + 4)) = *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (GHIDRA_UINT((local_28 + iVar8)) & *GHIDRA_CAST((this + 0x18)) - 1U) * 4)) + 0x24)) + -1; } } piVar4 = GHIDRA_CAST(FUN_00686910(&visibleRange)); if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) < *piVar4) || ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) == *piVar4 && (*GHIDRA_CAST((this + 4)) < piVar4[1])))) { isPastRange = true; } else { isPastRange = false; } piVar7 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))); if (isPastRange) { piVar7 = piVar4; } goto LAB_0068b639; } } else { iVar8 = *GHIDRA_CAST((this + 4)); historyContainer = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))); *GHIDRA_CAST((this + 4)) = iVar8 + 1; if ((historyContainer < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2))))) && (local_28 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))), *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (GHIDRA_UINT((local_28 + historyContainer)) & *GHIDRA_CAST((this + 0x18)) - 1U) * 4)) + 0x24)) <= iVar8 + 1)) { *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) + 1; *GHIDRA_CAST((this + 4)) = 0; } get_visible_line_range(this,&visibleRange); if ((*scrollPos < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2))))) || ((*scrollPos == *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) && (scrollPos[1] < *GHIDRA_CAST((this + 4)))))) { piVar7 = scrollPos; } else { piVar7 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))); } LAB_0068b639: iVar8 = *piVar7; *GHIDRA_CAST((this + 4)) = piVar7[1]; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = iVar8; } cVar2 = FUN_00686ad0(0x107); if (cVar2 != '\0') { puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(puVar6); } if (puVar6 < *GHIDRA_CAST((this + 0x58))) { *GHIDRA_CAST((this + 0x58)) = *GHIDRA_CAST((this + 0x58)) + -1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x59])) + 0x1)))) = 0; } } cVar2 = FUN_00686ad0(0x106); if (cVar2 != '\0') { puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1)))); } if (*GHIDRA_CAST((this + 0x58)) < puVar6 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2))))) { *GHIDRA_CAST((this + 0x58)) = *GHIDRA_CAST((this + 0x58)) + 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x59])) + 0x1)))) = 0; } } local_28 = GHIDRA_CAST(0x10d); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x10c); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') { if (!isCtrlHeld) goto LAB_0068b719; } else { if (!isCtrlHeld) { puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(puVar6); } goto LAB_0068b713; } get_visible_line_range(this,&visibleRange); uVar3 = extraout_EAX[1]; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = *extraout_EAX; *GHIDRA_CAST((this + 4)) = uVar3; } LAB_0068b7bc: local_28 = GHIDRA_CAST(0x56); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x14e); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x14d); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') goto LAB_0068bb56; uVar9 = (g_manager->_optionsConfig)._consoleFont + 1; uVar10 = 2; if (uVar9 < 2) { uVar10 = uVar9; } (g_manager->_optionsConfig)._consoleFont = uVar10; FUN_00692960(); } else { uVar10 = (g_manager->_optionsConfig)._consoleFont - 1; (g_manager->_optionsConfig)._consoleFont = -GHIDRA_UINT((uVar10 != 0)) & uVar10; FUN_00692960(); } goto LAB_0068bb4f; } pasteBase = GHIDRA_CAST(FUN_00a26670()); clipboardText = pasteBase; if (pasteBase != GHIDRA_CAST(0x0)) { textEnd = pasteBase; do { cVar2 = *textEnd; textEnd = textEnd + 1; } while (cVar2 != '\0'); uVar9 = GHIDRA_INT(textEnd) - GHIDRA_INT((pasteBase + 1)); iVar8 = 0; lineStart = 0; uVar10 = 0; if (uVar9 != 0) { do { local_28 = pasteBase + uVar10; if (*local_28 == '\n') { LAB_0068b825: if (uVar10 != 0) { puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1)))); } std_string_insert(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))),*GHIDRA_CAST((this + 0x58)) - GHIDRA_INT(puVar6), GHIDRA_CAST((clipboardText + lineStart)),uVar10 - lineStart); submit_input(this,unused); if (*local_28 == '\r') { if ((uVar10 + 1 < uVar9) && (local_28[1] == '\n')) { uVar10 = uVar10 + 1; } } iVar8 = uVar10 + 1; pasteBase = clipboardText; lineStart = iVar8; } } else if (*local_28 == '\r') goto LAB_0068b825; uVar10 = uVar10 + 1; } while (uVar10 < uVar9); } puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (*GHIDRA_CAST((this + 0x10)) < 0x10) { local_24 = GHIDRA_CAST(puVar6); } else { pasteBase = clipboardText; local_24 = *GHIDRA_CAST(puVar6); } local_28 = GHIDRA_CAST((*GHIDRA_CAST((this + 0x58)) - GHIDRA_INT(local_24))); std_string_insert(puVar6,*GHIDRA_CAST((this + 0x58)) - GHIDRA_INT(local_24),GHIDRA_CAST((pasteBase + iVar8)), uVar9 - iVar8); FUN_006924d0(); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(puVar6); } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x59])) + 0x1)))) = 0; *GHIDRA_CAST((this + 0x58)) = puVar6 + GHIDRA_INT((local_28 + (uVar9 - lineStart))); goto LAB_0068bb4f; } } else { if (isCtrlHeld) { puVar5 = GHIDRA_CAST(FUN_00686910(&visibleRange)); uVar3 = puVar5[1]; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = *puVar5; *GHIDRA_CAST((this + 4)) = uVar3; goto LAB_0068b7bc; } puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1)))); } puVar6 = puVar6 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); LAB_0068b713: *GHIDRA_CAST((this + 0x58)) = puVar6; LAB_0068b719: cVar2 = FUN_00686ad0(0x103); if (cVar2 == '\0') { cVar2 = FUN_00686ad0(0x105); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x101); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); iVar8 = extraout_ECX; if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x14f); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_28,0,0); iVar8 = extraout_ECX_00; if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x109); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74)) (0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 == '\0') { local_28 = GHIDRA_CAST(0x108); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74)) (0xffffffff,FUN_00a207d0,&local_28,0,0); if (cVar2 != '\0') { iVar8 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))); if ((iVar8 == *GHIDRA_CAST((this + 0x20))) || (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))) = iVar8 + -1, iVar8 + -1 == *GHIDRA_CAST((this + 0x20))) ) { FUN_0040c2f0(); } else { if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x22])) + 0x2)))) == GHIDRA_CAST(0x0)) { historyContainer = 0; } else { historyContainer = **GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x22])) + 0x2)))); } FUN_0040c310(*(uint32_t *) (*GHIDRA_CAST((historyContainer + 4)) + (*GHIDRA_CAST((historyContainer + 8)) - 1U & iVar8 - 2U) * 4)); } puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); FUN_006924d0(); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(puVar6); } *GHIDRA_CAST((this + 0x58)) = puVar6 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); } } else if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))) != *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x21])) + 0x1)))) + *GHIDRA_CAST((this + 0x20))) { uVar3 = FUN_0060c420(); FUN_0040c310(uVar3); puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1)))); } *GHIDRA_CAST((this + 0x58)) = puVar6 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); FUN_006924d0(); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x25])) + 0x1)))) + 1; } goto LAB_0068bb4f; } } if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))) == 0) goto LAB_0068bb7f; submit_input(this,iVar8); } else if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))) != 0) { puVar11 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar11 = *GHIDRA_CAST(puVar11); } puVar6 = *GHIDRA_CAST((this + 0x58)); if (puVar6 == puVar11 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2))))) { puVar6 = puVar6 + -1; } goto LAB_0068b9c7; } } else if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))) != 0) { puVar6 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar6 = *GHIDRA_CAST(puVar6); } if (puVar6 < *GHIDRA_CAST((this + 0x58))) { puVar6 = *GHIDRA_CAST((this + 0x58)) + -1; LAB_0068b9c7: puVar5 = GHIDRA_CAST(FUN_00684e70(&local_28,puVar6)); *GHIDRA_CAST((this + 0x58)) = *puVar5; FUN_006924d0(); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x59])) + 0x1)))) = 0; } } LAB_0068bb4f: FillOmnicomplete(this); } LAB_0068bb56: local_24 = GHIDRA_CAST(0x100); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_24,0,0); if (cVar2 == '\0') { ExceptionList = local_10; return; } LAB_0068bb7f: Close(this); ExceptionList = local_10; return; } // 0068bba0 uint8_t Console::update_state() { Console *pickup = this; int iVar1; Entity_Player *glitchedCrownOwner; uint32_t entityIndex; float easedHeight; float fVar2; int *messageDeque; int *messageTtl; Entity_Pickup *pickup; void *room; messageDeque = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x15])) + 0x1)))); for (entityIndex = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x19])) + 0x1)))); entityIndex != *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x1a])) + 0x2)))) + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x19])) + 0x1)))); entityIndex = entityIndex + 1) { if (messageDeque == GHIDRA_CAST(0x0)) { iVar1 = 0; } else { iVar1 = *messageDeque; } if (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar1 + 4)) + (*GHIDRA_CAST((iVar1 + 8)) - 1U & entityIndex) * 4)) + 0x18 )) == 0) break; if (messageDeque == GHIDRA_CAST(0x0)) { iVar1 = 0; } else { iVar1 = *messageDeque; } messageTtl = GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar1 + 4)) + (*GHIDRA_CAST((iVar1 + 8)) - 1U & entityIndex) * 4 )) + 0x18)); *messageTtl = *messageTtl + -1; } if (*GHIDRA_CAST(pickup) != 0) { if ((g_manager->_netplayManager == *GHIDRA_CAST((g_manager + 1))) && (glitchedCrownOwner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x2b1,GHIDRA_CAST(&g_game->_playerManager),1), glitchedCrownOwner != GHIDRA_CAST(0x0))) { entityIndex = 0; room = g_game->_room; if (*GHIDRA_CAST((GHIDRA_CAST(room) + 0x1264)) != 0) { do { pickup = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(room) + 0x125c)) + entityIndex * 4)); if ((pickup->_type == 5) && (pickup->_variant == 100)) { (GHIDRA_CAST((pickup)))->Entity_Pickup::update_cycle_collectible(0); } entityIndex = entityIndex + 1; } while (entityIndex < *GHIDRA_CAST((GHIDRA_CAST(room) + 0x1264))); } } iVar1 = *GHIDRA_CAST(pickup); fVar2 = g_screenHeight - 1.0; switch(iVar1) { case 1: *GHIDRA_CAST(pickup) = 2; iVar1 = 2; case 2: if ((0xe < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[1])) + 0x1))))) || (easedHeight = 1.0 - (float)*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[1])) + 0x1)))) / 14.0, easedHeight = (1.0 - easedHeight * easedHeight) * fVar2, *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[5])) + 0x1)))) = easedHeight, fVar2 <= easedHeight)) { *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[5])) + 0x1)))) = fVar2; } break; case 3: *GHIDRA_CAST(pickup) = 2; iVar1 = 2; break; case 4: fVar2 = (1.0 - (float)*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[1])) + 0x1)))) / 14.0) * fVar2; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[5])) + 0x1)))) = fVar2; if (fVar2 <= 0.0) { *GHIDRA_CAST(pickup) = 0; iVar1 = 0; } } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x59])) + 0x1)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x59])) + 0x1)))) + 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[1])) + 0x1)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[1])) + 0x1)))) + 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x59])) + 0x1)))) = -GHIDRA_UINT((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x59])) + 0x1)))) < 0x1e)) & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(pickup[0x59])) + 0x1)))); if (iVar1 != 0) { if ((g_manager->_netplayManager == *GHIDRA_CAST((g_manager + 1))) || ((*GHIDRA_CAST((g_manager + 1)) - g_manager->_netplayManager & 0xfffffffcU) == 4)) { return 1; } } } return 0; } // 0068bd70 void * Console::RenderHistory(Font *font, float unk, float unk2, uint8_t unk3) { Console *pCVar1; KColor color; uint16_t *puVar2; uint32_t *puVar3; int iVar4; uint8_t *******pppppppbVar5; void *pvVar6; void *extraout_EAX; void *extraout_EAX_00; uint32_t **ppuVar7; Console *pCVar8; uint32_t *puVar9; uint32_t uVar10; int *historyProxy; uint8_t *text; int iVar11; uint8_t *lineEnd; float ageFade; float in_XMM2_Da; float in_XMM3_Da; uint8_t glyphBuffer [24]; float blue; float green; float red; uint32_t fontSettings; uint32_t local_68; uint32_t local_64; uint32_t local_60; uint32_t local_5c; uint32_t local_58; uint32_t local_54; float textX; float alpha; void *historyIndex; uint32_t *local_44; uint16_t *local_40; uint32_t *local_3c; Font *renderFont; float fadeMult; float textY; uint8_t *******local_2c; KColor local_28; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; local_8 = 0xffffffff; puStack_c = &LAB_00af8f28; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((glyphBuffer + 0x8c)); local_44 = GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) + -1)); renderFont = font; ppuVar7 = &local_44; if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) < GHIDRA_INT(local_44)) { ppuVar7 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))); } fadeMult = 1.0; local_3c = *ppuVar7; local_44 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x15])) + 0x1)))); pCVar1 = this + 4; local_40 = (uint16_t *) (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & GHIDRA_INT(local_3c) + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x24)) + -1); pCVar8 = GHIDRA_CAST(&local_40); if (*GHIDRA_CAST(pCVar1) < GHIDRA_INT(local_40)) { pCVar8 = pCVar1; } iVar11 = *GHIDRA_CAST(pCVar8); if (local_44 == GHIDRA_CAST(0x0)) { historyProxy = GHIDRA_CAST(0x0); } else { historyProxy = GHIDRA_CAST(*local_44); } historyIndex = (void *)(GHIDRA_INT(local_3c) + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))); if (in_XMM3_Da + unk <= 0.0) { return pCVar1; } ExceptionList = &local_10; textX = in_XMM2_Da; textY = in_XMM3_Da; LAB_0068be32: if (historyIndex == (void *)(local_44[4] + local_44[3])) { ExceptionList = local_10; return (void *)(local_44[4] + local_44[3]); } if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } local_28._unk = 0; uVar10 = *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4)) + 0x1c)); red = ((float)(uVar10 >> 0x10 & 0xff) + 0.0) / 255.0; green = ((float)(uVar10 >> 8 & 0xff) + 0.0) / 255.0; blue = ((float)(uVar10 & 0xff) + 0.0) / 255.0; if (unk3 == 0) { alpha = unk2; } else { if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } iVar4 = *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4)) + 0x18)); ageFade = (float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)]) / 90.0; if (ageFade <= 0.0) { ageFade = 0.0; } if (1.0 <= ageFade) { ageFade = 1.0; } alpha = ageFade * unk2 * 0.5; } local_3c = GHIDRA_CAST((alpha * fadeMult)); if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } local_28._red = red; local_28._green = green; local_28._blue = blue; if (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4)) + 0x20)) != 0) { if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } puVar9 = *(uint32_t **) (*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4); puVar3 = puVar9; if (0xf < GHIDRA_UINT(puVar9[5])) { puVar3 = GHIDRA_CAST(*puVar9); } if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } local_40 = (uint16_t *) (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4)) + 0x20)) + iVar11 * 2); lineEnd = GHIDRA_CAST((puVar9[4] + GHIDRA_INT(puVar3))); do { if (historyProxy == GHIDRA_CAST(0x0)) { iVar11 = 0; } else { iVar11 = *historyProxy; } puVar9 = *(uint32_t **) (*GHIDRA_CAST((iVar11 + 4)) + (*GHIDRA_CAST((iVar11 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4); if (0xf < GHIDRA_UINT(puVar9[5])) { puVar9 = GHIDRA_CAST(*puVar9); } text = GHIDRA_CAST((GHIDRA_UINT(*local_40) + GHIDRA_INT(puVar9))); local_28._alpha = 0.0; local_28._unk = 0xf; local_2c = GHIDRA_CAST(0x0); if (text != lineEnd) { (GHIDRA_CAST((GHIDRA_CAST(&local_2c))))->msvc::string::assign(text,GHIDRA_INT(lineEnd) - GHIDRA_INT(text)); } fontSettings = 0; local_68 = 0xffff; local_64 = 0; local_60 = 0x3f800000; local_5c = 0xffffffff; local_58 = 0; local_54 = 0; local_8 = 1; pppppppbVar5 = GHIDRA_CAST(&local_2c); if (0xf < GHIDRA_UINT(local_28._unk)) { pppppppbVar5 = local_2c; } pvVar6 = Font::measure_string (renderFont,glyphBuffer,GHIDRA_CAST(pppppppbVar5),&fontSettings,&g_vectorOne); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),2); color._green = green; color._red = red; color._blue = blue; color._alpha = (float)local_3c; color._unk = 0; Font::render_glyph_quads(renderFont,pvVar6,textX,textY,1.0,1.0,color,&fontSettings); msvc::vector<12byte>::clear(); pvVar6 = (void *)msvc::vector<12byte>::_Tidy(); puVar2 = local_40; textY = textY - unk; if (unk3 != 0) { fadeMult = fadeMult - 0.1; local_3c = GHIDRA_CAST((alpha * fadeMult)); if (fadeMult <= 0.0) goto LAB_0068c183; } local_8 = 0xffffffff; if (*local_40 == 0) goto LAB_0068c183; if (0xf < GHIDRA_UINT(local_28._unk)) { uVar10 = local_28._unk + 1; pppppppbVar5 = local_2c; if (0xfff < uVar10) { pppppppbVar5 = GHIDRA_CAST(local_2c[-1]); uVar10 = local_28._unk + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pppppppbVar5))))) goto LAB_0068c2aa; } operator_delete(pppppppbVar5,uVar10); } local_40 = puVar2 + 1; lineEnd = text; } while( true ); } fontSettings = 0; local_68 = 0xffff; local_64 = 0; local_60 = 0x3f800000; local_5c = 0xffffffff; local_58 = 0; local_54 = 0; local_8 = 3; if (historyProxy == GHIDRA_CAST(0x0)) { iVar4 = 0; } else { iVar4 = *historyProxy; } lineEnd = *GHIDRA_CAST((*GHIDRA_CAST((iVar4 + 4)) + (*GHIDRA_CAST((iVar4 + 8)) - 1U & GHIDRA_UINT(historyIndex)) * 4)); if (0xf < *GHIDRA_CAST((lineEnd + 0x14))) { lineEnd = *GHIDRA_CAST(lineEnd); } local_28._alpha = (float)local_3c; Font::DrawString(font,lineEnd,&local_28,&fontSettings,textX,textY); textY = textY - unk; local_8 = 0xffffffff; pvVar6 = extraout_EAX_00; if (unk3 != 0) { fadeMult = fadeMult - 0.1; goto LAB_0068c277; } goto LAB_0068c27f; LAB_0068c183: local_8 = 0xffffffff; if (0xf < GHIDRA_UINT(local_28._unk)) { uVar10 = local_28._unk + 1; pppppppbVar5 = local_2c; if (0xfff < uVar10) { pppppppbVar5 = GHIDRA_CAST(local_2c[-1]); uVar10 = local_28._unk + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(local_2c) + (-4 - GHIDRA_INT(pppppppbVar5))))) { LAB_0068c2aa: local_8 = 0xffffffff; /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pppppppbVar5,uVar10); pvVar6 = extraout_EAX; } iVar11 = 0; font = renderFont; if (unk3 != 0) { LAB_0068c277: if (fadeMult <= 0.0) { ExceptionList = local_10; return pvVar6; } } LAB_0068c27f: historyIndex = (void *)(GHIDRA_INT(historyIndex) + 1); if (textY + unk <= 0.0) { ExceptionList = local_10; return pvVar6; } goto LAB_0068be32; } // 0068c2e0 void Console::Render() { KColor color; KColor color_00; KColor color_01; Console *this_00; Font *this_01; void *pvVar1; uint8_t *pbVar2; uint8_t *puVar3; uint8_t ****ppppbVar4; uint32_t *shaderTop; uint8_t *pbVar5; int unused; int unused_00; uint32_t uVar6; uint8_t *pbVar7; int iVar8; float fVar9; float cursorLeft; float fVar10; Console *right; uint8_t innerQuadBuf [112]; uint8_t quadBuf [116]; float cursorY; KColor quadColor; uint8_t *local_98; float cursorX; void *local_90; Console *local_8c; float fontOffsetY; float lineHeight; Font *local_80; float lineY; uint8_t ****lineText [4]; uint32_t local_68; uint32_t lineTextCapacity; uint8_t ****segmentText [4]; uint32_t local_50; uint32_t segmentTextCapacity; uint32_t local_48; uint32_t local_44; uint32_t local_40; uint8_t ****local_3c; uint32_t local_38; uint32_t local_34; uint32_t local_30; uint32_t local_2c; uint32_t local_28; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; uint8_t ***local_14; puStack_20 = GHIDRA_CAST((segmentText + 0x17)); local_14 = GHIDRA_CAST(0xffffffff); puStack_18 = &LAB_00af8fae; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((segmentText + 0x14)); ExceptionList = &local_1c; iVar8 = (g_manager->_optionsConfig)._consoleFont; if (iVar8 == 0) { LAB_0068c381: fVar10 = 15.0; lineHeight = 15.0; if (iVar8 == 2) goto LAB_0068c393; LAB_0068c35a: fontOffsetY = 0.0; lineHeight = fVar10; if (iVar8 == 0) { LAB_0068c3b3: local_80 = &g_manager->_font4_terminus; LAB_0068c3b9: fontOffsetY = 0.0; } else { if (iVar8 == 1) { local_80 = &g_manager->_font5_terminus8; goto LAB_0068c3b9; } if (iVar8 != 2) goto LAB_0068c3b3; local_80 = &g_manager->_font8_LuaMiniOutlined; } } else { if (iVar8 == 1) { fVar10 = 12.0; goto LAB_0068c35a; } if (iVar8 != 2) goto LAB_0068c381; fVar10 = 8.0; lineHeight = 8.0; LAB_0068c393: local_80 = &g_manager->_font8_LuaMiniOutlined; fontOffsetY = -4.0; } local_8c = this; ppppbVar4 = GHIDRA_CAST((segmentText + 0x17)); if ((g_manager->_netplayManager == *GHIDRA_CAST((g_manager + 1))) && ((((g_game == GHIDRA_CAST(0x0) || ((g_game->_dailyChallenge)._id == 0)) || (ppppbVar4 = GHIDRA_CAST((segmentText + 0x17)), (g_game->_dailyChallenge)._isPractice != 0)) && ((ppppbVar4 = GHIDRA_CAST((segmentText + 0x17)), (g_manager->_optionsConfig)._enableDebugConsole != 0 && (ppppbVar4 = GHIDRA_CAST((segmentText + 0x17)), (g_manager->_optionsConfig)._enableFadedConsoleDisplay != 0)))))) { ppppbVar4 = GHIDRA_CAST((segmentText + 0x17)); if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))) != g_screenHeight - 1.0) { fVar9 = 1.0 - *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))) / (g_screenHeight - 1.0); if (fVar9 <= 0.0) { fVar9 = 0.0; } if (1.0 <= fVar9) { fVar9 = 1.0; } RenderHistory(this,local_80,fVar10,fVar9,1); ppppbVar4 = GHIDRA_CAST(puStack_20); } } puStack_20 = GHIDRA_CAST(ppppbVar4); if (*GHIDRA_CAST(this) == 0) { ExceptionList = local_1c; return; } quadColor._red = 0.0; quadColor._green = 0.0; quadColor._blue = 0.0; quadColor._alpha = 0.5; quadColor._unk = 0; pvVar1 = render_quad_set_uniform_color (quadBuf,0.0,0.0,g_screenWidth,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))),&quadColor); render_color_shader_pass(pvVar1); quadColor._red = 1.0; quadColor._green = 1.0; quadColor._blue = 1.0; quadColor._alpha = 0.8; quadColor._unk = 0; pvVar1 = render_quad_set_uniform_color (quadBuf,0.0,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))) - 2.0,g_screenWidth, *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))),&quadColor); render_color_shader_pass(pvVar1); iVar8 = 5 - (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x12])) + 0x2)))) - *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x11])) + 0x1)))) >> 1); lineY = (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[5])) + 0x1)))) - lineHeight) - 3.0; if (-1 < iVar8) { pbVar7 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[iVar8 * 8 + 0x26])) + 0x2))); do { local_40 = 0; local_3c = GHIDRA_CAST(0xffff); local_38 = 0; local_34 = 0x3f800000; local_30 = 0xffffffff; local_2c = 0; local_28 = 0; local_14 = GHIDRA_CAST(0x0); pbVar2 = pbVar7; if (0xf < *GHIDRA_CAST((pbVar7 + 0x14))) { pbVar2 = *GHIDRA_CAST(pbVar7); } pvVar1 = Font::measure_string(local_80,&quadColor._green,pbVar2,&local_40,&g_vectorOne); local_14 = GHIDRA_CAST(CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x1))),1)); color._blue = 0.8862745; color._red = 0.5411765; color._green = 0.16862746; color._alpha = 1.0; color._unk = 0; Font::render_glyph_quads(local_80,pvVar1,10.0,lineY + fontOffsetY,1.0,1.0,color,&local_40); msvc::vector<12byte>::clear(); msvc::vector<12byte>::_Tidy(); pbVar7 = pbVar7 + -0x18; iVar8 = iVar8 + -1; local_14 = GHIDRA_CAST(0xffffffff); lineY = lineY - lineHeight; } while (-1 < iVar8); this = local_8c; } cursorX = (float)&DAT_bf800000; local_98 = &(*GHIDRA_CAST((GHIDRA_CAST(&(this[9])) + 0x1))); puVar3 = local_98; if (0xf < *GHIDRA_CAST((this + 0x10))) { puVar3 = *GHIDRA_CAST(local_98); } pbVar7 = puVar3 + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0xe])) + 0x2)))); local_90 = *(void **)&(*GHIDRA_CAST((GHIDRA_CAST(&(local_8c[0x12])) + 0x2))); pbVar2 = pbVar7; if (local_90 != *(void **)&(*GHIDRA_CAST((GHIDRA_CAST(&(local_8c[0x11])) + 0x1)))) { do { pbVar7 = local_98; if (0xf < *GHIDRA_CAST((local_98 + 0x14))) { pbVar7 = *GHIDRA_CAST(local_98); } pbVar7 = pbVar7 + *GHIDRA_CAST((GHIDRA_CAST(local_90) + -2)); local_50 = 0; segmentTextCapacity = 0xf; segmentText[0] = GHIDRA_CAST(0x0); if (pbVar7 != pbVar2) { (GHIDRA_CAST((GHIDRA_CAST(segmentText))))->msvc::string::assign(pbVar7,GHIDRA_INT(pbVar2) - GHIDRA_INT(pbVar7)); } local_40 = 0; local_3c = GHIDRA_CAST(0xffff); local_38 = 0; local_34 = 0x3f800000; local_30 = 0xffffffff; local_2c = 0; local_28 = 0; local_14 = GHIDRA_CAST(0x3); ppppbVar4 = GHIDRA_CAST(segmentText); if (0xf < segmentTextCapacity) { ppppbVar4 = segmentText[0]; } pvVar1 = Font::measure_string (local_80,&quadColor._green,GHIDRA_CAST(ppppbVar4),&local_40,&g_vectorOne); (*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x0))) = 4; color_00._blue = 0.18431373; color_00._red = 0.6784314; color_00._green = 1.0; color_00._alpha = 1.0; color_00._unk = 0; Font::render_glyph_quads(local_80,pvVar1,10.0,lineY + fontOffsetY,1.0,1.0,color_00,&local_40); msvc::vector<12byte>::clear(); msvc::vector<12byte>::_Tidy(); local_14 = GHIDRA_CAST(CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x1))),2)); if (((cursorX < 0.0) && (pbVar5 = *GHIDRA_CAST((local_8c + 0x58)), pbVar7 <= pbVar5)) && (pbVar5 <= pbVar2)) { local_3c = GHIDRA_CAST(0x0); local_2c = 0; local_28 = 0xf; if (pbVar7 != pbVar5) { (GHIDRA_CAST((GHIDRA_CAST(&local_3c))))->msvc::string::assign(pbVar7,GHIDRA_INT(pbVar5) - GHIDRA_INT(pbVar7)); } ppppbVar4 = GHIDRA_CAST(&local_3c); if (0xf < local_28) { ppppbVar4 = local_3c; } iVar8 = Font::get_string_width_n(local_80,GHIDRA_CAST(ppppbVar4),-1); cursorX = ((float)((double)iVar8 + __uint_to_double_fixup[-(iVar8 >> 0x1f)]) + 10.0) - 1.0; if (0xf < local_28) { uVar6 = local_28 + 1; ppppbVar4 = local_3c; if (0xfff < uVar6) { ppppbVar4 = GHIDRA_CAST(local_3c[-1]); uVar6 = local_28 + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(ppppbVar4))))) goto LAB_0068c97e; } operator_delete(ppppbVar4,uVar6); } cursorY = lineY; } lineY = lineY - lineHeight; local_14 = GHIDRA_CAST(0xffffffff); if (0xf < segmentTextCapacity) { uVar6 = segmentTextCapacity + 1; ppppbVar4 = segmentText[0]; if (0xfff < uVar6) { ppppbVar4 = GHIDRA_CAST(segmentText[0][-1]); uVar6 = segmentTextCapacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(segmentText[0]) + (-4 - GHIDRA_INT(ppppbVar4))))) goto LAB_0068c97e; } operator_delete(ppppbVar4,uVar6); } local_90 = (void *)(GHIDRA_INT(local_90) + -2); pbVar2 = pbVar7; } while (local_90 != *(void **)&(*GHIDRA_CAST((GHIDRA_CAST(&(local_8c[0x11])) + 0x1)))); pbVar2 = local_98; if (0.0 <= cursorX) goto LAB_0068c99b; } pbVar2 = local_98; pbVar5 = local_98; if (0xf < *GHIDRA_CAST((local_98 + 0x14))) { pbVar5 = *GHIDRA_CAST(local_98); } local_28 = 0xf; local_3c = GHIDRA_CAST(0x0); local_2c = 0; if (pbVar5 != *GHIDRA_CAST((local_8c + 0x58))) { (GHIDRA_CAST((GHIDRA_CAST(&local_3c))))->msvc::string::assign(pbVar5,GHIDRA_INT(*GHIDRA_CAST((local_8c + 0x58))) - GHIDRA_INT(pbVar5)); } ppppbVar4 = GHIDRA_CAST(&local_3c); if (0xf < local_28) { ppppbVar4 = local_3c; } iVar8 = Font::get_string_width_n(local_80,GHIDRA_CAST(ppppbVar4),-1); cursorX = ((float)((double)iVar8 + __uint_to_double_fixup[-(iVar8 >> 0x1f)]) + 10.0) - 1.0; if (0xf < local_28) { uVar6 = local_28 + 1; ppppbVar4 = local_3c; if (0xfff < uVar6) { ppppbVar4 = GHIDRA_CAST(local_3c[-1]); uVar6 = local_28 + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(local_3c) + (-4 - GHIDRA_INT(ppppbVar4))))) { LAB_0068c97e: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ppppbVar4,uVar6); } cursorY = lineY; LAB_0068c99b: if (0xf < *GHIDRA_CAST((pbVar2 + 0x14))) { pbVar2 = *GHIDRA_CAST(pbVar2); } local_68 = 0; lineTextCapacity = 0xf; lineText[0] = GHIDRA_CAST(0x0); if (pbVar2 != pbVar7) { (GHIDRA_CAST((GHIDRA_CAST(lineText))))->msvc::string::assign(pbVar2,GHIDRA_INT(pbVar7) - GHIDRA_INT(pbVar2)); } this_01 = local_80; local_40 = 0; local_3c = GHIDRA_CAST(0xffff); local_38 = 0; local_34 = 0x3f800000; local_30 = 0xffffffff; local_2c = 0; local_28 = 0; local_14 = GHIDRA_CAST(0x6); ppppbVar4 = GHIDRA_CAST(lineText); if (0xf < lineTextCapacity) { ppppbVar4 = lineText[0]; } pvVar1 = Font::measure_string(local_80,&quadColor._green,GHIDRA_CAST(ppppbVar4),&local_40,&g_vectorOne) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x0))) = 7; color_01._blue = 0.18431373; color_01._red = 0.6784314; color_01._green = 1.0; color_01._alpha = 1.0; color_01._unk = 0; Font::render_glyph_quads(this_01,pvVar1,10.0,lineY + fontOffsetY,1.0,1.0,color_01,&local_40); msvc::vector<12byte>::clear(); msvc::vector<12byte>::_Tidy(); this_00 = local_8c; lineY = lineY - lineHeight; local_14 = GHIDRA_CAST(CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x1))),5)); if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(local_8c[0x59])) + 0x1)))) < 0xf) { pbVar7 = GHIDRA_CAST((cursorY + lineHeight)); quadColor._unk = 0; right = GHIDRA_CAST((cursorX + 3.0)); quadColor._red = 0.0; quadColor._green = 0.0; quadColor._blue = 0.0; quadColor._alpha = 1.0; cursorLeft = cursorX; fVar10 = cursorY; local_98 = pbVar7; local_8c = right; local_90 = render_quad_set_uniform_color (quadBuf,cursorX,cursorY,(float)right,(float)pbVar7,&quadColor); if ((*GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x40)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x2c)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x54)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x68))) * 0.25 != 0.0) { shader_push(GHIDRA_CAST("KAGE_ColorShader")); local_38 = 0; local_48 = 0; local_3c = GHIDRA_CAST(0x0); local_44 = 0; local_30 = 0x3f800000; local_40 = 0x3f800000; local_2c = 0x3f800000; local_34 = 0x3f800000; local_28 = local_28 & 0xffffff00; pvVar1 = kage_graphics_flush((void *)0x0); render_quad_draw(pvVar1,&local_48,local_90,1,unused); if (g_shaderStackSize == 0) { KAGE_LogMessage(0x10,GHIDRA_CAST("Shader stack empty\n")); } shaderTop = GHIDRA_CAST(FUN_00684fc0()); g_currentShader = (void *)*shaderTop; g_shaderStackSize = g_shaderStackSize - 1; if (g_shaderStackSize == 0) { DAT_00c379d8 = 0; } cursorLeft = cursorX; fVar10 = cursorY; right = local_8c; pbVar7 = local_98; } fVar9 = 0.25; quadColor._red = 0.6784314; quadColor._green = 1.0; quadColor._blue = 0.18431373; quadColor._alpha = 1.0; quadColor._unk = 0; local_90 = render_quad_set_uniform_color (innerQuadBuf,cursorLeft + 1.0,fVar10 + 1.0,(float)right - 1.0, (float)pbVar7 - 1.0,&quadColor); if ((*GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x40)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x2c)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x54)) + *GHIDRA_CAST((GHIDRA_CAST(local_90) + 0x68))) * fVar9 != 0.0) { shader_push(GHIDRA_CAST("KAGE_ColorShader")); local_38 = 0; local_48 = 0; local_3c = GHIDRA_CAST(0x0); local_44 = 0; local_30 = 0x3f800000; local_40 = 0x3f800000; local_2c = 0x3f800000; local_34 = 0x3f800000; local_28 = local_28 & 0xffffff00; pvVar1 = kage_graphics_flush((void *)0x0); render_quad_draw(pvVar1,&local_48,local_90,1,unused_00); if (g_shaderStackSize == 0) { KAGE_LogMessage(0x10,GHIDRA_CAST("Shader stack empty\n")); } shaderTop = GHIDRA_CAST(FUN_00684fc0()); g_currentShader = (void *)*shaderTop; g_shaderStackSize = g_shaderStackSize - 1; if (g_shaderStackSize == 0) { DAT_00c379d8 = 0; } } } RenderHistory(this_00,this_01,lineHeight,1.0,0); if (0xf < lineTextCapacity) { uVar6 = lineTextCapacity + 1; ppppbVar4 = lineText[0]; if (0xfff < uVar6) { ppppbVar4 = GHIDRA_CAST(lineText[0][-1]); uVar6 = lineTextCapacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(ppppbVar4))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ppppbVar4,uVar6); } ExceptionList = local_1c; return; } // 0068cdc0 void Console::RunCommand(std_string *command, std_string *output, Entity_Player *player) { Console *entityConfig = this; std_string seed; char cVar1; uint8_t bVar2; uint8_t *pbVar3; int iVar4; Vector *posResult; uint32_t uVar5; Entity_Player *tmpPlayer; basic_string,msvc::allocator_> *pbVar6; uint32_t uVar7; void *pvVar8; EntityConfig *entityConfig; EntityConfig_Entity *entityConfigEntry; PlayerManager *playerManager; std_string *psVar9; char *pcVar10; Level *level; RoomDescriptor *roomDesc; RoomConfig *roomConfigs; Game *game; RoomConfig_Room *roomConfig; Room *pRVar11; int iVar12; GridEntity *gridEntity; ItemConfig *itemConfig; ItemConfig_Item *configItem; Entity *itemCount; ItemPool *itemPool; Entity_NPC *pEVar13; Seeds *seeds; uint32_t *puVar14; ChallengeParam *challengeParams; int *piVar15; LuaEngine *luaEngine; ModManager *modManager; BossPool *bossPool; uint32_t controllerIndex; Vector *randomOffset; HUD *hud; EntityList *entityConfigEntry; char *luaEngine; char *bossPool; uint8_t *entityCount; int *hud; uint32_t extraout_EDX; int iVar16; float fVar17; Entity_Player *pEVar18; Entity *pEVar19; code *atoiFn; uint8_t *nextIndex; uint32_t uVar20; float fVar21; double dVar22; uint8_t auStack_2c0 [68]; uint32_t uStack_27c; int in_stack_fffffd8c; int in_stack_fffffd90; void *in_stack_fffffd94; int in_stack_fffffd98; uint32_t uVar23; char *_Str2; uint8_t bVar24; size_t _MaxCount; Vector coPlayerPos; uint32_t local_230; uint32_t local_22c; Vector local_228; EntityList *local_21c; Vector local_218; uint8_t replaceChar; Entity *local_20c; Entity_Player *local_208; Entity_NPC *local_204; uint32_t local_200; Entity_NPC *local_1fc; char local_1f5; int tokensBegin; int tokensEnd; uint8_t local_1e5; std_string local_1e4; std_string local_1cc; std_string local_1b4; std_string local_19c; basic_string,msvc::allocator_> local_184 [24]; std_string local_16c; std_string local_154; std_string local_13c; std_string local_124; std_string local_10c; std_string local_f4; std_string local_dc; uint8_t local_c4 [24]; std_string local_ac; std_string local_94; uint8_t local_7c [12]; char *local_70; uint32_t local_6c; uint32_t local_68; char *macroCommands [2]; uint8_t local_5c [20]; char *local_48; char *local_44; char *local_40; char *local_3c; uint8_t *local_38; uint8_t entityIdText [8]; std_string local_2c; uint32_t stackCookie; void *local_10; uint8_t *puStack_c; uint32_t local_8; Manager *manager; local_8 = 0xffffffff; puStack_c = &LAB_00af9745; local_10 = ExceptionList; stackCookie = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size); ExceptionList = &local_10; local_208 = player; local_21c = GHIDRA_CAST(0x0); local_20c = GHIDRA_CAST(entityConfig); string_split(&tokensBegin,command,0x20); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0; if (player == GHIDRA_CAST(0x0)) { player = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetPlayer(0); local_208 = player; } cVar1 = FUN_004561f0(); iVar16 = tokensBegin; if ((cVar1 == '\0') || (GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18)) < 2)) { cVar1 = FUN_004561f0(); if (cVar1 != '\0') { if ((1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) && (cVar1 = FUN_004561f0(), cVar1 != '\0')) { local_7c[8] = '\0'; local_7c[9] = '\0'; local_7c[10] = '\0'; local_7c[0xb] = '\0'; local_70 = GHIDRA_CAST(0x0); local_6c = 0; local_68 = 1; pEVar18 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetPlayer(0); (GHIDRA_CAST((pEVar18)))->Entity_Player::console_spawn(GHIDRA_CAST((local_7c + 8)),1); goto LAB_0069249e; } uVar5 = Random(); pEVar13 = GHIDRA_CAST((&DAT_00c33d80 + (uVar5 % 0x3b) * 4)); local_204 = pEVar13; if (1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { cVar1 = FUN_004561f0(); if (cVar1 == '\0') { pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_c4)))->msvc::string::string(pvVar8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 8; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; uVar5 = FUN_00414410(); if (2 < uVar5) { do { FUN_004143f0(); FUN_00421620(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 9; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 8; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } } FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_c4); FUN_00684e50(); FUN_00693eb0(); local_1fc = GHIDRA_CAST(&DAT_00c33d80); local_200 = 0; do { pEVar13 = local_1fc; sprintf_s(entityIdText,0x20,GHIDRA_CAST("%d.%d")); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(entityIdText); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 10; entityConfig = GHIDRA_CAST(FUN_00417910()); entityConfigEntry = EntityConfig::GetEntity (entityConfig,GHIDRA_INT(*(void **))pEVar13,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pEVar13)) + 0x4)))),0); (GHIDRA_CAST((local_7c)))->msvc::string::string_from_cstr(GHIDRA_CAST("unknown")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb; if (entityConfigEntry != GHIDRA_CAST(0x0)) { (GHIDRA_CAST((entityConfigEntry)))->EntityConfig_Entity::GetName(GHIDRA_CAST((local_5c + 0x10)),0); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } (GHIDRA_CAST((local_94._buf)))->msvc::string::string(local_7c); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc; FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_7c); FUN_00684e50(); FUN_00693eb0(); FUN_004143f0(); iVar16 = FUN_00693650(); if ((iVar16 == 0) || (iVar16 = FUN_00693650(), iVar16 != -1)) { pEVar13 = GHIDRA_CAST((&DAT_00c33d80 + local_200 * 4)); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0068d936; } (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 8; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); local_200 = local_200 + 1; local_1fc = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_1fc)) + 0x10)))); } while (local_200 < 0x3b); pEVar13 = local_204; LAB_0068d936: (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); } else { local_7c[8] = '\0'; local_7c[9] = '\0'; local_7c[10] = '\0'; local_7c[0xb] = '\0'; local_70 = GHIDRA_CAST(0x0); local_6c = 0; local_68 = 1; pEVar18 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetPlayer(0); (GHIDRA_CAST((pEVar18)))->Entity_Player::console_spawn(GHIDRA_CAST((local_7c + 8)),1); } } if (pEVar13 == GHIDRA_CAST(0x0)) { msvc::string::string_from_cstr (local_94._buf, GHIDRA_CAST("Failed to spawn delirious boss: unsupported ID or Variant.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xd; } else { playerManager = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetPlayerManager(); pEVar18 = (GHIDRA_CAST((playerManager)))->PlayerManager::GetPlayer(0); (GHIDRA_CAST((pEVar18)))->Entity_Player::console_spawn(GHIDRA_CAST(pEVar13),1); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Spawned delirious boss.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xe; } goto LAB_0068d95d; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6580c); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("forceroom")); if (bVar2 != 0) { uVar5 = FUN_00414410(); if (uVar5 < 2) { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Cleared forced room.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x16; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); DAT_00bf9428 = 0xffffffff; DAT_00bf9424 = 1; DAT_00c71668 = 0; } else { FUN_004143f0(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 == '.') { FUN_004143f0(); pbVar3 = GHIDRA_CAST(FUN_004170e0()); local_1e5 = *pbVar3; if ((local_1e5 == 0x73) || (local_1e5 == 0x78)) { FUN_004143f0(); FUN_00651a90(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x17; string_split(local_c4 + 0xc,&local_ac,0x2e); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x18; psVar9 = GHIDRA_CAST(FUN_004143f0()); iVar16 = RoomConfig::GetStageIdByName(psVar9); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x17; msvc::vector::_Tidy(); iVar4 = 0; string_split(&local_70,&local_ac,0x2e); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x19; uVar5 = FUN_00414410(); if (1 < uVar5) { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar12 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar12 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar4 = atoi(GHIDRA_CAST(pbVar3)); } } if (local_1e5 == 0x78) { game = GHIDRA_CAST(Config)::GetCollectibles(); DAT_00bf9428 = (GHIDRA_CAST((game)))->Game::GetStageID(0); } else { DAT_00bf9428 = 0; } DAT_00bf9424 = iVar16; DAT_00c71668 = iVar4; msvc::vector::_Tidy(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); } else if (local_1e5 == 100) { FUN_004143f0(); pcVar10 = GHIDRA_CAST(FUN_00651a90()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar16 = atoi(GHIDRA_CAST(pbVar3)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); game = GHIDRA_CAST(Config)::GetCollectibles(); DAT_00bf9428 = (GHIDRA_CAST((game)))->Game::GetStageID(0); DAT_00bf9424 = 1; DAT_00c71668 = iVar16; } FUN_00421790(); FUN_008295c0(); roomConfigs = GHIDRA_CAST(FUN_00421790()); psVar9 = RoomConfig::GetStageDisplayName (roomConfigs,GHIDRA_CAST((local_5c + 0x10)),DAT_00bf9428,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1a; (GHIDRA_CAST((psVar9->_buf)))->msvc::string::c_str(); print_format(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } } goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("gridspawn")); if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 1 < uVar5)) { bVar2 = 0x2e; psVar9 = GHIDRA_CAST(FUN_004143f0()); string_split(&local_70,psVar9,bVar2); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1b; local_1fc = GHIDRA_CAST(0x0); iVar16 = FUN_00414410(); if (iVar16 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); atoi(GHIDRA_CAST(pbVar3)); } uVar5 = FUN_00414410(); if (1 < uVar5) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_1fc = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); } pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); uVar5 = Random(); uVar5 = (GHIDRA_CAST((pRVar11)))->Room::GetRandomTileIndex(uVar5); uVar20 = FUN_00414410(); if (2 < uVar20) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); (GHIDRA_CAST((pRVar11)))->Room::RemoveGridEntity(uVar5,0,0); } (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetCurrentRoom(); FUN_00685d60(); pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); gridEntity = (GHIDRA_CAST((pRVar11)))->Room::GetGridEntity(uVar5); if (gridEntity != GHIDRA_CAST(0x0)) { pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); gridEntity = (GHIDRA_CAST((pRVar11)))->Room::GetGridEntity(uVar5); gridEntity->guard_check_icall(); } msvc::vector::_Tidy(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("stage")); if ((bVar2 != 0) && (iVar16 = FUN_00414410(), iVar16 == 2)) { iVar16 = 0; FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 == 'a') { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); FUN_00684ee0(); iVar16 = 1; } else { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 == 'b') { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); FUN_00684ee0(); iVar16 = 2; } else { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 == 'c') { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); FUN_00684ee0(); iVar16 = 4; } else { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 == 'd') { FUN_004143f0(); pRVar11 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); FUN_00684ee0(); iVar16 = 5; } } } } pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar4 = atoi(GHIDRA_CAST(pbVar3)); if (0xd < iVar4 - 1U) goto LAB_0069249e; level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::SetStage(iVar4,iVar16); level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::Init(0); level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::Update(); playerManager = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetPlayerManager(); (GHIDRA_CAST((playerManager)))->PlayerManager::trigger_new_room_effects(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Changed stage.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1c; goto LAB_0068d95d; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("debug")); if ((bVar2 != 0) && (iVar16 = FUN_00414410(), iVar16 == 2)) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar16 = atoi(GHIDRA_CAST(pbVar3)); uVar5 = iVar16 - 1; if (uVar5 < 0xe) { FUN_00685f10(); bVar2 = (GHIDRA_CAST((g_game)))->Game::GetDebugFlag(uVar5); if (bVar2 == 0) { (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Disabled debug flag.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1e; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); psVar9 = &local_ac; } else { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Enabled debug flag.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1d; Print(entityConfig,&local_94,0xffd3d3d3,0x96); psVar9 = &local_94; } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((psVar9->_buf)))->msvc::string::_Tidy_deallocate(); } if (uVar5 == 8) { uVar5 = 0; iVar16 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); if (iVar16 != 0) { do { (GHIDRA_CAST((g_game)))->Game::GetPlayer(uVar5); FUN_007c2e80(); uVar5 = uVar5 + 1; uVar20 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); } while (uVar5 < uVar20); } } else if (uVar5 == 3) { uVar5 = 0; iVar16 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); if (iVar16 != 0) { do { pEVar18 = (GHIDRA_CAST((g_game)))->Game::GetPlayer(uVar5); (GHIDRA_CAST((pEVar18)))->Entity_Player::AddCacheFlags(1); pEVar18 = (GHIDRA_CAST((g_game)))->Game::GetPlayer(uVar5); (GHIDRA_CAST((pEVar18)))->Entity_Player::EvaluateItems(); uVar5 = uVar5 + 1; uVar20 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); } while (uVar5 < uVar20); } } goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("giveitem")); if (bVar2 != 0) { LAB_0068e5e5: uVar5 = FUN_00414410(); if (uVar5 < 2) goto LAB_0068ef7a; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("remove")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6617c); if (bVar2 != 0) goto LAB_0068e674; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("remove2")); if (bVar2 != 0) goto LAB_0068e674; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6616c); local_1f5 = '\0'; if (bVar2 != 0) goto LAB_0068e674; } else { LAB_0068e674: local_1f5 = '\x01'; } FUN_004143f0(); FUN_00693680(); pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_1e5 = *pbVar3; FUN_004143f0(); pcVar10 = GHIDRA_CAST(FUN_00693680()); if ((*pcVar10 == '2') && (iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetOtherTwin(), iVar16 != 0)) { player = GHIDRA_CAST((GHIDRA_CAST((player)))->Entity_Player)::GetOtherTwin(); local_208 = player; } if ((uint8_t)(pbVar3[1] - 0x30) < 10) { local_20c = GHIDRA_CAST(atoi(GHIDRA_CAST((pbVar3 + 1)))); } else { local_20c = GHIDRA_CAST(0xffffffff); } pEVar19 = local_20c; if (local_1e5 != 0x2a) { if (local_1e5 == 99) { if (local_20c != GHIDRA_CAST(0x0)) { Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); itemCount = GHIDRA_CAST((GHIDRA_CAST((pvVar8)))->std)::vector::size(); if (pEVar19 < itemCount) { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(GHIDRA_INT(pEVar19)); if (configItem != GHIDRA_CAST(0x0)) { if (local_1f5 == '\0') { iVar16 = (GHIDRA_CAST((g_game)))->Game::Challenge(); if (iVar16 == 0x2b) { (GHIDRA_CAST((player)))->Entity_Player::AddItemCard(GHIDRA_UINT(pEVar19)); } else { iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetBatteryCharge(0); if ((iVar16 != 0) && (((bVar2 = (GHIDRA_CAST((player)))->Entity_Player::HasCollectible(0x216,0), bVar2 == 0 || (iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetBatteryCharge(1), iVar16 != 0)) && (configItem->type == 3)))) { itemConfig = Isaac::GetItemConfig(); iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetBatteryCharge(0); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(iVar16); if ((configItem != GHIDRA_CAST(0x0)) && (configItem->type == 3)) { bVar24 = 1; uVar20 = 0; bVar2 = 0; uVar5 = (GHIDRA_CAST((player)))->Entity_Player::GetBatteryCharge(0); (GHIDRA_CAST((player)))->Entity_Player::RemoveCollectible(uVar5,bVar2,uVar20,bVar24); } pEVar19 = local_20c; } Entity_Player::AddCollectible(player,GHIDRA_INT(pEVar19),-1,1,0,0,0); } } else { (GHIDRA_CAST((player)))->Entity_Player::RemoveCollectible(GHIDRA_UINT(pEVar19),0,0,1); } } goto LAB_0069249e; } } goto LAB_0068e806; } if (((local_1e5 == 0x74) || (local_1e5 == 0x54)) && (local_20c != GHIDRA_CAST(0x0))) { itemConfig = Isaac::GetItemConfig(); pvVar8 = (GHIDRA_CAST((itemConfig)))->Config::GetTrinkets(); itemCount = GHIDRA_CAST((GHIDRA_CAST((pvVar8)))->std)::vector::size(); if (pEVar19 < itemCount) { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetTrinket(GHIDRA_UINT(pEVar19)); if (configItem != GHIDRA_CAST(0x0)) { if (local_1f5 == '\0') { iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetMaxTrinkets(); iVar16 = (GHIDRA_CAST((player)))->Entity_Player::GetTrinket(iVar16 - 1); if (iVar16 != 0) { uVar5 = (GHIDRA_CAST((player)))->Entity_Player::GetTrinket(0); (GHIDRA_CAST((player)))->Entity_Player::TryRemoveTrinket(uVar5); } if (local_1e5 == 0x54) { pEVar19 = GHIDRA_CAST((GHIDRA_UINT(pEVar19) | 0x8000)); } (GHIDRA_CAST((player)))->Entity_Player::AddTrinket(GHIDRA_INT(pEVar19),1); } else { (GHIDRA_CAST((player)))->Entity_Player::TryRemoveTrinket(GHIDRA_UINT(pEVar19)); } } goto LAB_0069249e; } } if (local_1e5 != 0x6b) { if ((local_1e5 == 0x70) || (local_1e5 == 0x50)) { Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetPillEffects(); itemCount = GHIDRA_CAST((GHIDRA_CAST((pvVar8)))->std)::vector::size(); if (pEVar19 < itemCount) { if (local_1f5 == '\0') { itemPool = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetItemPool(); uVar5 = (GHIDRA_CAST((itemPool)))->ItemPool::ForceAddPillEffect(GHIDRA_INT(pEVar19)); if (local_1e5 == 0x50) { uVar5 = uVar5 | 0x800; } (GHIDRA_CAST((player)))->Entity_Player::AddPill(uVar5); goto LAB_0069249e; } msvc::string::string_from_cstr (local_94._buf,GHIDRA_CAST("Removing pills has not been implemented.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x22; goto LAB_0068d95d; } } goto LAB_0068e806; } if (pEVar19 == GHIDRA_CAST(0x0)) goto LAB_0068e806; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCards(); itemCount = GHIDRA_CAST((GHIDRA_CAST((pvVar8)))->std)::vector::size(); if (itemCount <= pEVar19) goto LAB_0068e806; if (local_1f5 == '\0') { (GHIDRA_CAST((player)))->Entity_Player::AddCard(GHIDRA_INT(pEVar19)); goto LAB_0069249e; } msvc::string::string_from_cstr (local_94._buf,GHIDRA_CAST("Removing cards has not been implemented.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x21; goto LAB_0068d95d; } if (local_1f5 == '\0') { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("What are you trying to do?\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x20; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); } else { msvc::string::string_from_cstr (local_94._buf,GHIDRA_CAST("Restoring player to zero collectibles/trinkets.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x1f; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = 1; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); uVar5 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (1 < uVar5) { do { bVar2 = ItemConfig::IsValidCollectible(uVar20); if (bVar2 != 0) { (GHIDRA_CAST((player)))->Entity_Player::RemoveCollectible(uVar20,0,0,1); } uVar20 = uVar20 + 1; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); uVar5 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (uVar20 < uVar5); } uVar20 = 1; itemConfig = Isaac::GetItemConfig(); pvVar8 = (GHIDRA_CAST((itemConfig)))->Config::GetTrinkets(); uVar5 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (1 < uVar5) { do { (GHIDRA_CAST((player)))->Entity_Player::TryRemoveTrinket(uVar20); uVar20 = uVar20 + 1; itemConfig = Isaac::GetItemConfig(); pvVar8 = (GHIDRA_CAST((itemConfig)))->Config::GetTrinkets(); uVar5 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (uVar20 < uVar5); } } LAB_0068e806: pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_7c)))->msvc::string::string(pvVar8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; uVar5 = FUN_00414410(); if (2 < uVar5) { do { FUN_004143f0(); FUN_00421620(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x24; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } } FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_7c); FUN_00684e50(); FUN_00693eb0(); local_1e5 = 0x20; replaceChar = 0x5f; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_7c); FUN_00684e50(); FUN_006851c0(); uVar5 = 0; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); iVar16 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (iVar16 != 0) { do { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(uVar5); if (configItem != GHIDRA_CAST(0x0)) { (GHIDRA_CAST((configItem)))->ItemConfig_Item::GetLocalizedName(GHIDRA_CAST(local_c4),0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x25; FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_c4 ); FUN_00684e50(); FUN_00693eb0(); iVar16 = FUN_00693650(); if (iVar16 != -1) { if (local_1f5 == '\0') { iVar16 = (GHIDRA_CAST((g_game)))->Game::Challenge(); pEVar18 = local_208; if (iVar16 == 0x2b) { (GHIDRA_CAST((local_208)))->Entity_Player::AddItemCard(uVar5); (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); } else { iVar16 = (GHIDRA_CAST((local_208)))->Entity_Player::GetBatteryCharge(0); if ((iVar16 != 0) && ((bVar2 = (GHIDRA_CAST((pEVar18)))->Entity_Player::HasCollectible(0x216,0), bVar2 == 0 || (iVar16 = (GHIDRA_CAST((pEVar18)))->Entity_Player::GetBatteryCharge(1), iVar16 != 0)))) { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(uVar5); if (configItem->type == 3) { itemConfig = Isaac::GetItemConfig(); iVar16 = (GHIDRA_CAST((pEVar18)))->Entity_Player::GetBatteryCharge(0); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(iVar16); if ((configItem != GHIDRA_CAST(0x0)) && (configItem->type == 3)) { bVar24 = 1; uVar7 = 0; bVar2 = 0; uVar20 = (GHIDRA_CAST((pEVar18)))->Entity_Player::GetBatteryCharge(0); (GHIDRA_CAST((pEVar18)))->Entity_Player::RemoveCollectible(uVar20,bVar2,uVar7,bVar24); } } } Entity_Player::AddCollectible(pEVar18,uVar5,-1,1,0,0,0); (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); } } else { (GHIDRA_CAST((local_208)))->Entity_Player::RemoveCollectible(uVar5,0,0,1); (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); } goto LAB_0069249e; } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); uVar20 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (uVar5 < uVar20); } uVar5 = 0; itemConfig = Isaac::GetItemConfig(); pvVar8 = (GHIDRA_CAST((itemConfig)))->Config::GetTrinkets(); iVar16 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (iVar16 != 0) { do { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetTrinket(uVar5); if (configItem != GHIDRA_CAST(0x0)) { (GHIDRA_CAST((configItem)))->ItemConfig_Item::GetLocalizedName(&local_ac,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x26; FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_ac); FUN_00684e50(); FUN_00693eb0(); iVar16 = FUN_00693650(); pEVar18 = local_208; if (iVar16 != -1) { if (local_1f5 != '\0') { (GHIDRA_CAST((local_208)))->Entity_Player::TryRemoveTrinket(uVar5); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } iVar16 = (GHIDRA_CAST((local_208)))->Entity_Player::GetMaxTrinkets(); iVar16 = (GHIDRA_CAST((pEVar18)))->Entity_Player::GetTrinket(iVar16 - 1); if (iVar16 != 0) { uVar20 = (GHIDRA_CAST((pEVar18)))->Entity_Player::GetTrinket(0); (GHIDRA_CAST((pEVar18)))->Entity_Player::TryRemoveTrinket(uVar20); } (GHIDRA_CAST((pEVar18)))->Entity_Player::AddTrinket(uVar5,1); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0068ef6d; } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x23; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; itemConfig = Isaac::GetItemConfig(); pvVar8 = (GHIDRA_CAST((itemConfig)))->Config::GetTrinkets(); uVar20 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (uVar5 < uVar20); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } LAB_0068ef6d: (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66178); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("remove")); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6617c); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("giveitem2")); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66160); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("remove2")); if (bVar2 != 0) goto LAB_0068e5e5; psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6616c); if (bVar2 != 0) goto LAB_0068e5e5; LAB_0068ef7a: psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("metro")); if ((bVar2 != 0) && (iVar16 = FUN_00414410(), iVar16 == 2)) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); bVar2 = *pbVar3; if ((uint8_t)(pbVar3[1] - 0x30) < 10) { uVar5 = atoi(GHIDRA_CAST((pbVar3 + 1))); } else { uVar5 = 0xffffffff; } if (bVar2 == 99) { Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); uVar20 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (uVar5 < uVar20) { DAT_00c7166c = uVar5; goto LAB_0069249e; } } pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_7c)))->msvc::string::string(pvVar8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x27; uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; uVar5 = FUN_00414410(); if (2 < uVar5) { do { FUN_004143f0(); FUN_00421620(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x28; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x27; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } } FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_7c); FUN_00684e50(); FUN_00693eb0(); replaceChar = 0x20; local_1e5 = 0x5f; msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)local_7c); FUN_00684e50(); FUN_006851c0(); uVar5 = 0; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); iVar16 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (iVar16 != 0) { do { itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(uVar5); if (configItem != GHIDRA_CAST(0x0)) { (GHIDRA_CAST((configItem)))->ItemConfig_Item::GetLocalizedName(&local_ac,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x29; FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) &local_ac); FUN_00684e50(); FUN_00693eb0(); iVar16 = FUN_00693650(); if (iVar16 != -1) { DAT_00c7166c = uVar5; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x27; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); } uVar5 = uVar5 + 1; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); uVar20 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (uVar5 < uVar20); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } goto LAB_0068ef6d; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("costumetest")); if (bVar2 != 0) { iVar16 = Isaac::Random(5); pEVar13 = GHIDRA_CAST((iVar16 + 2)); local_1fc = pEVar13; iVar16 = FUN_00414410(); if (iVar16 == 2) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); pEVar13 = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); local_1fc = pEVar13; } (GHIDRA_CAST((player)))->Entity_Player::ClearCostumes(); if (0 < GHIDRA_INT(pEVar13)) { iVar16 = 0; do { do { do { iVar4 = Isaac::Random(0x2dd); itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(iVar4); } while (configItem == GHIDRA_CAST(0x0)); } while (configItem->type != 1); (GHIDRA_CAST((player)))->Entity_Player::AddCostume(configItem,0); iVar16 = iVar16 + 1; } while (iVar16 < GHIDRA_INT(local_1fc)); } goto LAB_00692495; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b65858); if (bVar2 != 0) { FUN_00685f00(); print_format(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("restart")); if (bVar2 != 0) { iVar16 = FUN_00414410(); if (iVar16 == 2) { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar16 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar16 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar16 = atoi(GHIDRA_CAST(pbVar3)); if (iVar16 < 0) { LAB_0068f438: iVar16 = 0; } else { FUN_00417910(); FUN_00685d50(); iVar4 = FUN_00693540(); if (iVar4 <= iVar16) goto LAB_0068f438; } g_manager->_startPlayerType = iVar16; } } seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((GHIDRA_CAST(auStack_2c0))))->Seeds::construct_from_copy(seeds); Manager::RestartGame(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("listcollectibles")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("repeat")); if ((bVar2 == 0) || (iVar16 = FUN_00414410(), iVar16 != 2)) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b658e4); if (bVar2 != 0) { uVar5 = FUN_00414410(); if (uVar5 < 2) { seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((seeds)))->Seeds::GetStartSeedString(&local_ac); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x35; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(&DAT_00b66310); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x36; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); } else { pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_7c)))->msvc::string::string(pvVar8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2f; uVar5 = FUN_00414410(); if (2 < uVar5) { FUN_004143f0(); FUN_004143f0(); FUN_00694170(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x30; in_stack_fffffd98 = 0x68f7e0; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2f; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); } bVar2 = Seeds::IsStringValidSeed(GHIDRA_CAST(local_7c)); if (bVar2 == 0) { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Invalid seed.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x34; } else { (GHIDRA_CAST((g_game)))->Game::GetSeeds(); uVar23 = 0x68f828; cVar1 = Seeds::IsSpecialSeed(); if (cVar1 == '\0') { uVar5 = 0x68f83a; seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); uStack_27c = 0x68f84a; (GHIDRA_CAST((auStack_2c0 + 0x4c)))->msvc::string::string(local_7c); seed._buf[4] = (char)in_stack_fffffd90; seed._buf[5] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 8); seed._buf[6] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 0x10); seed._buf[7] = (char)(GHIDRA_UINT(in_stack_fffffd90) >> 0x18); seed._buf[0] = (char)in_stack_fffffd8c; seed._buf[1] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 8); seed._buf[2] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 0x10); seed._buf[3] = (char)(GHIDRA_UINT(in_stack_fffffd8c) >> 0x18); (*GHIDRA_CAST((GHIDRA_CAST(&(seed._buf)) + 0x8))) = in_stack_fffffd94; seed._buf[0xc] = (char)in_stack_fffffd98; seed._buf[0xd] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 8); seed._buf[0xe] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 0x10); seed._buf[0xf] = (char)(GHIDRA_UINT(in_stack_fffffd98) >> 0x18); seed._size = uVar23; seed._capacity = uVar5; (GHIDRA_CAST((seeds)))->Seeds::SetStartSeed(seed); (GHIDRA_CAST((g_game)))->Game::GetSeeds(); FUN_00685db0(); seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((GHIDRA_CAST(auStack_2c0))))->Seeds::construct_from_copy(seeds); Manager::RestartGame(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } (GHIDRA_CAST((g_game)))->Game::GetSeeds(); cVar1 = FUN_009e9d10(); if (cVar1 == '\0') { (GHIDRA_CAST((g_game)))->Game::GetSeeds(); cVar1 = FUN_00685e00(); if (cVar1 == '\0') { msvc::string::string_from_cstr (local_94._buf, GHIDRA_CAST("Special seed conflicts with the current stack.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x32; } else { (GHIDRA_CAST((g_game)))->Game::GetSeeds(); FUN_009eba40(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Removed special seed.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x31; } } else { (GHIDRA_CAST((g_game)))->Game::GetSeeds(); FUN_009eba00(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Added special seed.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x33; } } Print(entityConfig,&local_94,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); } goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("clearseeds")); if (bVar2 != 0) { seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((seeds)))->Seeds::ClearSeedEffects(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("challenge")); if (bVar2 != 0) { iVar16 = FUN_00414410(); if (iVar16 == 2) { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar16 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar16 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); if ((-1 < GHIDRA_INT(uVar5)) && (uVar20 = FUN_00685f70(), uVar5 <= uVar20)) { challengeParams = (GHIDRA_CAST((g_manager)))->Manager::GetChallengeParams(uVar5); manager = g_manager; g_manager->_startChallenge = uVar5; manager->_startPlayerType = challengeParams->_playerType; game = g_game; manager->_startDifficulty = challengeParams->_difficulty; seeds = GHIDRA_CAST((GHIDRA_CAST((game)))->Game)::GetSeeds(); (GHIDRA_CAST((GHIDRA_CAST(auStack_2c0))))->Seeds::construct_from_copy(seeds); Manager::RestartGame(); goto LAB_0069249e; } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Invalid challenge ID.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x37; goto LAB_0068d95d; } } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Invalid challenge ID.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x38; goto LAB_0068d95d; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("combo")); if ((bVar2 == 0) || (iVar16 = FUN_00414410(), iVar16 != 2)) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("cutscene")); if ((bVar2 == 0) || (iVar16 = FUN_00414410(), iVar16 != 2)) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("restock")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("clearcache")); if (bVar2 != 0) { AnmCache::Clear(); TextureCache::Purge(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("macro")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b664a4); if (bVar2 != 0) goto LAB_0068fda9; } else { LAB_0068fda9: uVar5 = FUN_00414410(); if (1 < uVar5) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b664a8); if (bVar2 != 0) { (GHIDRA_CAST((g_game)))->Game::ChangeRoom(-0x14,-1); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66464); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6650c); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b664c0); if (bVar2 != 0) { (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("goto s.boss.5000")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x43; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Soy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x44; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Mutant")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x45; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x46; RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 4")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x47; RunCommand(entityConfig,GHIDRA_CAST(local_7c),GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66558); if (bVar2 != 0) { (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 11a")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x48; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("goto s.boss.6000")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x49; LAB_00690100: RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b6657c); if (bVar2 != 0) { (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 11a")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4a; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("goto s.boss.6000")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4b; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Sad Onion")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4c; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Sad Onion")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4d; RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Torn")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4e; RunCommand(entityConfig,GHIDRA_CAST(local_7c),GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_c4)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Torn")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x4f; RunCommand(entityConfig,GHIDRA_CAST(local_c4),GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Mutant")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x50; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem A Dollar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x51; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Pyro")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x52; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x53; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST(&DAT_00b665a8)); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66580); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("bigchest")); if (bVar2 != 0) { macroCommands[0] = "stage 10a"; uVar5 = 0; macroCommands[1] = "g Polaroid"; (*GHIDRA_CAST((GHIDRA_CAST(&(local_5c)) + 0x0))) = "g Negative"; (*GHIDRA_CAST((GHIDRA_CAST(&(local_5c)) + 0x4))) = "debug 3"; (*GHIDRA_CAST((GHIDRA_CAST(&(local_5c)) + 0x8))) = "debug 4"; (*GHIDRA_CAST((GHIDRA_CAST(&(local_5c)) + 0xc))) = "g Mutant"; (*GHIDRA_CAST((GHIDRA_CAST(&(local_5c)) + 0x10))) = "g Soy"; local_48 = "giveitem Belt"; local_44 = "repeat 5"; local_40 = "giveitem Lord of the Pit"; local_3c = "debug 10"; local_38 = &DAT_00b665bc; do { msvc::string::string_from_cstr (local_f4._buf,GHIDRA_CAST(macroCommands[uVar5])); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5e; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); uVar5 = uVar5 + 1; } while (uVar5 < 0xc); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66664); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("delirium")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("beast")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b666a4); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b667e0); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66834); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("twitch")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66918); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b668a8); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b66178); if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 2 < uVar5)) { FUN_004143f0(); psVar9 = GHIDRA_CAST(FUN_006941b0()); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9d; RunCommand(entityConfig,psVar9,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } } else { uVar5 = FUN_00414410(); if (2 < uVar5) { FUN_004143f0(); psVar9 = GHIDRA_CAST(FUN_006941b0()); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9c; RunCommand(entityConfig,psVar9,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } } } else { uVar5 = FUN_00414410(); if (3 < uVar5) { FUN_004143f0(); psVar9 = GHIDRA_CAST(FUN_006941b0()); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9a; RunCommand(entityConfig,psVar9,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); FUN_004143f0(); psVar9 = GHIDRA_CAST(FUN_006941b0()); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9b; RunCommand(entityConfig,psVar9,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } } } else { msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("debug 16")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x98; RunCommand(entityConfig,GHIDRA_CAST((local_5c + 0x10)), GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_2c._buf,GHIDRA_CAST("twitch_init")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x99; RunCommand(entityConfig,&local_2c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); } } else { msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("giveitem Belt")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x92; RunCommand(entityConfig,GHIDRA_CAST((local_5c + 0x10)), GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_2c._buf,GHIDRA_CAST("giveitem Lord of the Pit")) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x93; RunCommand(entityConfig,&local_2c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_16c._buf,GHIDRA_CAST("giveitem Treasure Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x94; RunCommand(entityConfig,&local_16c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_16c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_19c._buf,GHIDRA_CAST("giveitem Blue Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x95; RunCommand(entityConfig,&local_19c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_19c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1b4._buf,GHIDRA_CAST("giveitem Compass")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x96; RunCommand(entityConfig,&local_1b4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1b4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1cc._buf,GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x97; RunCommand(entityConfig,&local_1cc,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_1cc._buf)))->msvc::string::_Tidy_deallocate(); } } else { msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("giveitem Belt")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x83; RunCommand(entityConfig,GHIDRA_CAST((local_5c + 0x10)), GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_2c._buf,GHIDRA_CAST("repeat 5")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x84; RunCommand(entityConfig,&local_2c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_16c._buf,GHIDRA_CAST("giveitem Lord of the Pit")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x85; RunCommand(entityConfig,&local_16c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_16c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_19c._buf,GHIDRA_CAST("giveitem Treasure Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x86; RunCommand(entityConfig,&local_19c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_19c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1b4._buf,GHIDRA_CAST("giveitem Blue Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x87; RunCommand(entityConfig,&local_1b4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1b4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1cc._buf,GHIDRA_CAST("giveitem Compass")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x88; RunCommand(entityConfig,&local_1cc,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1cc._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1e4._buf,GHIDRA_CAST("giveitem Black Candle")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x89; RunCommand(entityConfig,&local_1e4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1e4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_f4._buf,GHIDRA_CAST("giveitem X-Ray")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8a; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_124._buf, GHIDRA_CAST("giveitem We Need to Go Deeper")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8b; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_13c._buf,GHIDRA_CAST("debug 8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8c; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_154._buf,GHIDRA_CAST("giveitem Dollar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8d; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_dc._buf,GHIDRA_CAST("giveitem Pyro")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8e; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_10c._buf,GHIDRA_CAST("giveitem Skeleton Key")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x8f; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x90; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_ac._buf,GHIDRA_CAST("debug 10")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x91; RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); } } else { msvc::string::string_from_cstr (local_f4._buf,GHIDRA_CAST("giveitem Dead Cat")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x72; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0) ); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("repeat 2")) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x73; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_13c._buf,GHIDRA_CAST("giveitem Guppy\'s Collar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x74; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_154._buf,GHIDRA_CAST("giveitem Holy Mantle")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x75; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_dc._buf,GHIDRA_CAST("giveitem Schoolbag")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x76; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0) ); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_10c._buf,GHIDRA_CAST("giveitem MEAT!")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x77; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("repeat 12")) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x78; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0) ); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_ac._buf,GHIDRA_CAST("giveitem Compass")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x79; RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0) ); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_7c,GHIDRA_CAST("giveitem Blue Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7a; RunCommand(entityConfig,GHIDRA_CAST(local_7c),GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_c4,GHIDRA_CAST("giveitem Treasure Map")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7b; RunCommand(entityConfig,GHIDRA_CAST(local_c4),GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1e4._buf,GHIDRA_CAST("giveitem Baggy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7c; RunCommand(entityConfig,&local_1e4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1e4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1cc._buf,GHIDRA_CAST("giveitem p2")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7d; RunCommand(entityConfig,&local_1cc,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1cc._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_1b4._buf,GHIDRA_CAST("giveitem p3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7e; RunCommand(entityConfig,&local_1b4,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_1b4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_19c._buf,GHIDRA_CAST("giveitem Purse")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x7f; RunCommand(entityConfig,&local_19c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_19c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_16c._buf,GHIDRA_CAST("giveitem Paper Clip")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x80; RunCommand(entityConfig,&local_16c,GHIDRA_CAST(0x0), GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_16c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_2c._buf,GHIDRA_CAST("giveitem Petrified")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x81; RunCommand(entityConfig,&local_2c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0) ); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("giveitem My Little Unicorn")) ; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x82; RunCommand(entityConfig,GHIDRA_CAST((local_5c + 0x10)), GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } } else { (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 13")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6b; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_124._buf,GHIDRA_CAST("goto x.itemdungeon.666")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6c; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 0.8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6d; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 2.8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6e; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 1.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6f; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 4.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x70; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x71; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); } goto LAB_0069249e; } (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 0.12")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x65; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 2.12")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x66; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 1.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x67; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 4.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x68; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x69; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_10c._buf,GHIDRA_CAST("goto s.boss.3414")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x6a; } else { (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 9")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5f; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(&DAT_00b665bc); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x60; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 0.8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x61; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 2.8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x62; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 1.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 99; RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("combo 4.3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 100; } goto LAB_00690100; } (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x59; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("g Bible")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5a; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(&DAT_00b665bc); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5b; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5c; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 4")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x5d; } else { (GHIDRA_CAST((local_f4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("stage 6")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x54; RunCommand(entityConfig,&local_f4,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_f4._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_124._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("g Bible")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x55; RunCommand(entityConfig,&local_124,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_124._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_13c._buf)))->msvc::string::string_from_cstr(&DAT_00b665bc); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x56; RunCommand(entityConfig,&local_13c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_13c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_154._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x57; RunCommand(entityConfig,&local_154,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_154._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 4")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x58; } } else { (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("goto s.boss.5000")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x42; } } else { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 3")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3c; RunCommand(entityConfig,&local_94,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 8")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3d; RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::string_from_cstr(GHIDRA_CAST("debug 9")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3e; RunCommand(entityConfig,GHIDRA_CAST(local_7c),GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_c4)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Soy")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3f; RunCommand(entityConfig,GHIDRA_CAST(local_c4),GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)) ; local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_c4)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_10c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Bar")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x40; RunCommand(entityConfig,&local_10c,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_10c._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_dc._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("giveitem Pad")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x41; } RunCommand(entityConfig,&local_dc,GHIDRA_CAST(0x0),GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_dc._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("playsfx")); if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 1 < uVar5)) { local_1fc = GHIDRA_CAST(0x3f800000); uVar5 = FUN_00414410(); if (2 < uVar5) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); dVar22 = atof(GHIDRA_CAST(pbVar3)); local_204 = GHIDRA_CAST((float)dVar22); local_1fc = local_204; } pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar16 = atoi(GHIDRA_CAST(pbVar3)); SoundEffects::PlayWithFartOverride(iVar16,1.0,2,0,(float)local_1fc); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("curse")); if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 1 < uVar5)) { uVar20 = 1; uVar5 = FUN_00414410(); if (1 < uVar5) { do { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); atoi(GHIDRA_CAST(pbVar3)); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } FUN_00685f50(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("reseed")); if (bVar2 != 0) { seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); Config::GetCollectibles(); iVar16 = _get_index_plus_one_if_kind_4_5(); (GHIDRA_CAST((seeds)))->Seeds::ForgetStageSeed(iVar16); level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::Init(1); level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::Update(); playerManager = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetPlayerManager(); (GHIDRA_CAST((playerManager)))->PlayerManager::trigger_new_room_effects(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::string_from_cstr(GHIDRA_CAST("Changed stage.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9e; LAB_00691611: Print(entityConfig,GHIDRA_CAST((local_5c + 0x10)),0xffd3d3d3,0x96); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b658fc); if (bVar2 != 0) { iVar16 = 0; do { (GHIDRA_CAST((GHIDRA_CAST(g_manager))))->Room::GetTopLeftPos(); FUN_0092b230(); iVar16 = iVar16 + 1; } while (iVar16 < 0x50); msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("All easter eggs unlocked in main menu.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x9f; Print(entityConfig,GHIDRA_CAST((local_5c + 0x10)),0xffd3d3d3,0x96); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_2c._buf,GHIDRA_CAST("On the easter eggs menu press Q+E+Tab\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa0; Print(entityConfig,&local_2c,0xffd3d3d3,0x96); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); msvc::string::string_from_cstr (local_16c._buf,GHIDRA_CAST("or LB+RB+X to remove one from the list.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa1; Print(entityConfig,&local_16c,0xffd3d3d3,0x96); (GHIDRA_CAST((local_16c._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b65904); if ((bVar2 != 0) && (iVar16 = FUN_00414410(), iVar16 == 2)) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_204 = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(&s_empty); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa2); (GHIDRA_CAST((GHIDRA_CAST((entityConfig + 0x1c)))))->Room::GetGridHeight(); piVar15 = GHIDRA_CAST(std)::min(); for (iVar16 = *piVar15; 0 < iVar16; iVar16 = iVar16 + -1) { FUN_0060c530(); FUN_00694170(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa3; FUN_00651af0(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa2); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); } (GHIDRA_CAST((local_ac._buf)))->msvc::string::c_str(); FUN_00a19440(); FUN_00a26620(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::string_from_cstr(GHIDRA_CAST("Copied.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa4; Print(entityConfig,GHIDRA_CAST((local_5c + 0x10)),0xffd3d3d3,0x96); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("luarun")); if ((bVar2 != 0) && (iVar16 = FUN_00414410(), iVar16 == 2)) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); (GHIDRA_CAST(()))->LuaEngine::RunScript(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b659d8); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,&DAT_00b669b4); if (bVar2 != 0) goto LAB_006918d8; } else { LAB_006918d8: uVar5 = FUN_00414410(); if (1 < uVar5) { pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string(pvVar8); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa5); uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; uVar5 = FUN_00414410(); if (2 < uVar5) { do { FUN_004143f0(); FUN_00421620(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa6; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa5); (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } } FUN_00865660(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa7; cVar1 = FUN_0040c2d0(); if (cVar1 == '\0') { PrintError(entityConfig,GHIDRA_CAST(local_7c)); } (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("luamod")); if ((bVar2 != 0) && (uVar5 = FUN_00414410(), 1 < uVar5)) { pvVar8 = (void *)FUN_004143f0(); (GHIDRA_CAST((local_7c)))->msvc::string::string(pvVar8); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa8); uVar5 = FUN_00414410(); if (2 < uVar5) { uVar20 = 2; uVar5 = FUN_00414410(); if (2 < uVar5) { do { FUN_004143f0(); FUN_00421620(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xa9; FUN_00651d50(); FUN_004215a0(); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xa8); (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar20 = uVar20 + 1; uVar5 = FUN_00414410(); } while (uVar20 < uVar5); } } FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *) local_7c); FUN_00684e50(); FUN_00693eb0(); luaEngine = GHIDRA_CAST(FUN_0040d210()); pbVar3 = (GHIDRA_CAST((luaEngine)))->LuaEngine::LuamodCMD(local_7c); if ((char)pbVar3 == '\0') { (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::string_from_cstr(GHIDRA_CAST("Failed to run mod!\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xab; } else { (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::string_from_cstr(GHIDRA_CAST("Success!\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xaa; } Print(entityConfig,GHIDRA_CAST((local_5c + 0x10)),0xffd3d3d3,0x96); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((local_7c)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("luamem")); if (bVar2 != 0) { FUN_00685cc0(); lua_gc(); FUN_00685cc0(); lua_gc(); uStack_27c = 0x691bb8; print_format(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("reloadshaders")); if (bVar2 != 0) { modManager = GHIDRA_CAST(FUN_0040d210()); (GHIDRA_CAST((modManager)))->ModManager::TriggerResize(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("testbosspool")); if (bVar2 != 0) { FUN_005cba40(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xac; iVar16 = 10000; do { bossPool = GHIDRA_CAST(FUN_00685ef0()); uVar5 = Random(); (GHIDRA_CAST((bossPool)))->BossPool::init(uVar5); bossPool = GHIDRA_CAST(FUN_00685ef0()); gridEntity = GHIDRA_CAST(Config)::GetCollectibles(); iVar4 = (GHIDRA_CAST((gridEntity)))->GridEntity::GetType(); Config::GetCollectibles(); iVar12 = EntityPtr::Ref(); local_1fc = GHIDRA_CAST((GHIDRA_CAST((bossPool)))->BossPool)::GetBossId(iVar12,iVar4,GHIDRA_CAST(0x0)); msvc::set::find(); msvc::iterator_copy(&local_228,&local_218.y); cVar1 = FUN_00557bb0(); if (cVar1 == '\0') { iVar4 = FUN_005cba30(); *GHIDRA_CAST((iVar4 + 4)) = *GHIDRA_CAST((iVar4 + 4)) + 1; } else { local_204 = GHIDRA_CAST(0x1); FUN_005cbfa0(); FUN_005cbfc0(); } iVar16 = iVar16 + -1; } while (iVar16 != 0); FUN_0042c770(); msvc::iterator_copy(&local_228,&local_204); cVar1 = FUN_0042c710(); while (cVar1 != '\0') { piVar15 = GHIDRA_CAST(FUN_005cba30()); if (*piVar15 < 0) { if (g_game != GHIDRA_CAST(0x0)) { FUN_00685ed0(); FUN_005cba30(); FUN_005cba30(); goto LAB_00691de8; } } else if (g_game != GHIDRA_CAST(0x0)) { FUN_00685ed0(); FUN_005cba30(); FUN_00417910(); FUN_005cba30(); iVar16 = FUN_0069d200(); (GHIDRA_CAST((GHIDRA_CAST((iVar16 + 4)))))->msvc::string::c_str(); LAB_00691de8: print_format(); } FUN_00693270(); msvc::iterator_copy(&local_228,&local_204); cVar1 = FUN_0042c710(); } FUN_00436fb0(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("addplayer")); if (bVar2 == 0) { psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("reloadfx")); if (bVar2 != 0) { pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); (GHIDRA_CAST((pRVar11)))->Room::reload_backdrop(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("reloadwisps")); if (bVar2 != 0) { itemConfig = Isaac::GetItemConfig(); modManager = GHIDRA_CAST(FUN_0040d210()); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::string_from_cstr(GHIDRA_CAST("wisps.xml")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xaf; ModManager::TryRedirectPath (modManager,&local_16c,GHIDRA_CAST((local_5c + 0x10))); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb0; pbVar3 = (GHIDRA_CAST((luaEngine)))->msvc::string::c_str(); (GHIDRA_CAST((itemConfig)))->ItemConfig::load_wisps_xml(pbVar3,(void *)0x0); (GHIDRA_CAST((local_16c._buf)))->msvc::string::_Tidy_deallocate(); local_8 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); itemConfig = Isaac::GetItemConfig(); modManager = GHIDRA_CAST(FUN_0040d210()); (GHIDRA_CAST((local_2c._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("locusts.xml")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb1; (GHIDRA_CAST((modManager)))->ModManager::TryRedirectPath(&local_19c,&local_2c); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb2; pbVar3 = (GHIDRA_CAST((bossPool)))->msvc::string::c_str(); (GHIDRA_CAST((itemConfig)))->ItemConfig::LoadLocustConfig(pbVar3,GHIDRA_CAST(0x0)); (GHIDRA_CAST((local_19c._buf)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); local_21c = (GHIDRA_CAST((pRVar11)))->Room::GetEntities(); local_1fc = GHIDRA_CAST(0x0); iVar16 = (GHIDRA_CAST((local_21c)))->EntityList::Size(); if (iVar16 != 0) { do { puVar14 = GHIDRA_CAST(std)::vector::operator_index(); pEVar19 = GHIDRA_CAST(*puVar14); local_20c = pEVar19; bVar2 = (GHIDRA_CAST((pEVar19)))->Entity::IsType(3,0xce,-1); if (bVar2 == 0) { bVar2 = (GHIDRA_CAST((pEVar19)))->Entity::IsType(3,0xe7,-1); if (bVar2 != 0) { local_204 = *GHIDRA_CAST((*GHIDRA_CAST(pEVar19) + 4)); (GHIDRA_CAST((pEVar19)))->Entity::InitSeed(); (GHIDRA_CAST((pEVar19)))->Entity::SubType(); (GHIDRA_CAST((pEVar19)))->Entity::Variant(); (GHIDRA_CAST((local_20c)))->Entity::Type(); (*(code *)local_204)(); } } else { local_204 = *GHIDRA_CAST((*GHIDRA_CAST(pEVar19) + 4)); (GHIDRA_CAST(()))->Entity::InitSeed(); (GHIDRA_CAST((pEVar19)))->Entity::SubType(); (GHIDRA_CAST((pEVar19)))->Entity::Variant(); (GHIDRA_CAST((local_20c)))->Entity::Type(); (*(code *)local_204)(); } nextIndex = &(*GHIDRA_CAST((GHIDRA_CAST((local_1fc)) + 0x1))); local_1fc = GHIDRA_CAST(nextIndex); entityCount = GHIDRA_CAST((GHIDRA_CAST((local_21c)))->EntityList)::Size(); } while (nextIndex < entityCount); } goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("rewind")); if (bVar2 != 0) { Game::rewind(GHIDRA_CAST(0x0)); seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((GHIDRA_CAST(auStack_2c0))))->Seeds::construct_from_copy(seeds); Manager::RestartGame(); seeds = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetSeeds(); (GHIDRA_CAST((&g_manager->_startSeeds)))->Seeds::operator_assign(seeds); manager = g_manager; g_manager->_isSaveOnExit = 1; manager->_rerunAvailable = 1; FUN_00685ee0(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("clear")); if (bVar2 != 0) { FUN_00686110(); goto LAB_0069249e; } psVar9 = GHIDRA_CAST(FUN_004143f0()); bVar2 = str_eq_cstr(psVar9,GHIDRA_CAST("fix_rng_history_log")); if (bVar2 == 0) goto LAB_0069249e; iVar16 = FUN_00414410(); if (iVar16 == 2) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); pbVar3 = write_desync_dump(pbVar3); if (pbVar3 == GHIDRA_CAST(0x0)) { msvc::string::string_from_cstr (local_5c + 0x10,GHIDRA_CAST("Successfully fixed history log.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xb3; goto LAB_00691611; } } else { FUN_00414410(); } LAB_00692495: print_format(); goto LAB_0069249e; } local_200 = 0xffffffff; local_1fc = GHIDRA_CAST(0x0); uVar5 = FUN_00414410(); if (1 < uVar5) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_1fc = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); } uVar5 = FUN_00414410(); if (uVar5 < 3) { LAB_00691ed6: local_218.x = 0.0; local_218.y = 0.0; uVar5 = 0; iVar16 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); fVar17 = local_218.x; fVar21 = local_218.y; if (iVar16 != 0) { do { pEVar18 = (GHIDRA_CAST((g_game)))->Game::GetPlayer(uVar5); controllerIndex = (GHIDRA_CAST((pEVar18)))->Entity_Player::ControllerIndex(); uVar20 = 1 << (controllerIndex & 0x1f); uVar7 = 0; if (0x1f < controllerIndex) { uVar7 = uVar20; } uVar20 = uVar20 ^ uVar7; if (0x3f < controllerIndex) { uVar7 = uVar20; } fVar17 = (float)(GHIDRA_UINT(fVar17) | uVar20); fVar21 = (float)(GHIDRA_UINT(fVar21) | uVar7); uVar5 = uVar5 + 1; uVar20 = (GHIDRA_CAST((g_game)))->Game::GetNumPlayers(); } while (uVar5 < uVar20); } uVar5 = 0; iVar16 = (GHIDRA_CAST((GHIDRA_CAST(&PTR_vftable_00c57b18))))->KAGE::Input::Manager::get_device_count(); if (iVar16 != 0) { do { KAGE::Input::Manager::get_device (GHIDRA_CAST(&PTR_vftable_00c57b18),&local_218,uVar5); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xad; iVar16 = EntityPtr::Ref(); if (iVar16 != 0) { uVar20 = 1 << (uVar5 & 0x1f); uVar7 = 0; if (0x1f < uVar5) { uVar7 = uVar20; } uVar20 = uVar20 ^ uVar7; if (0x3f < uVar5) { uVar7 = uVar20; } if ((uVar20 & GHIDRA_UINT(fVar17)) == 0 && (uVar7 & GHIDRA_UINT(fVar21)) == 0) { piVar15 = GHIDRA_CAST(EntityPtr)::Ref(); _MaxCount = 8; _Str2 = "Wireless"; pcVar10 = GHIDRA_CAST((**(code **)(*piVar15 + 0xc))()); iVar16 = strncmp(pcVar10,_Str2,_MaxCount); if (iVar16 != 0) { entityConfigEntry = GHIDRA_CAST(EntityPtr)::Ref(); uVar5 = (GHIDRA_CAST((entityConfigEntry)))->EntityList::Size(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; FUN_004242b0(); goto LAB_00691fe7; } } } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; FUN_004242b0(); uVar5 = uVar5 + 1; uVar20 = KAGE::Input::Manager::get_device_count (GHIDRA_CAST(&PTR_vftable_00c57b18)); } while (uVar5 < uVar20); } uVar5 = local_200; LAB_00691fe7: if (GHIDRA_INT(uVar5) < 0) { uVar5 = 0; } } else { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); local_200 = uVar5; if (GHIDRA_INT(uVar5) < 0) goto LAB_00691ed6; } if (g_game != GHIDRA_CAST(0x0)) { FUN_00685ed0(); (GHIDRA_CAST((&PTR_vftable_00c57b18)))->InputManager::get_device(local_c4 + 0x10,uVar5); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0xae); local_21c = GHIDRA_CAST(0x1); piVar15 = GHIDRA_CAST(EntityPtr)::Ref(); (**(code **)(*piVar15 + 0xc))(); print_format(); } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))) = 0; if ((GHIDRA_UINT(local_21c) & 1) != 0) { FUN_004242b0(); } playerManager = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetPlayerManager(); pEVar18 = (GHIDRA_CAST((playerManager)))->PlayerManager::SpawnCoPlayer2(GHIDRA_INT(local_1fc)); (GHIDRA_CAST((pEVar18)))->Entity_Player::SetControllerIndex(uVar5,0); tmpPlayer = (GHIDRA_CAST((g_game)))->Game::GetPlayer(0); posResult = (GHIDRA_CAST((GHIDRA_CAST(tmpPlayer))))->Entity::Position(GHIDRA_CAST((local_c4 + 0x10))); randomOffset = MusicManager::RandomVector(&local_218); local_204 = GHIDRA_CAST(0x41200000); randomOffset = Vector::operator_mul(&local_228,GHIDRA_CAST(&local_204),randomOffset); posResult = (GHIDRA_CAST((posResult)))->Vector::__add(&coPlayerPos,randomOffset); (GHIDRA_CAST((GHIDRA_CAST(pEVar18))))->Entity::SetPosition(posResult); hud = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetHUD(); (GHIDRA_CAST((hud)))->HUD::AssignPlayerHUDs(); (GHIDRA_CAST((pEVar18)))->Entity_Player::InitPostLevelInitStats(); goto LAB_0069249e; } pRVar11 = GHIDRA_CAST((GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level)::GetCurrentRoom(); (GHIDRA_CAST((pRVar11)))->Room::ShopRestockFull(); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Shop is fully restocked.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3b; } else { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); if (uVar5 < 0x1b) { (GHIDRA_CAST((g_manager)))->Manager::ShowCutscene(uVar5,0,1); goto LAB_0069249e; } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Invalid cutscene ID.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x3a; } goto LAB_0068d95d; } bVar2 = 0x2e; psVar9 = GHIDRA_CAST(FUN_004143f0()); string_split(&local_70,psVar9,bVar2); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x39; iVar4 = 1; local_200 = 0; iVar16 = FUN_00414410(); atoiFn = atoi_exref; if (iVar16 != 0) { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar16 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar16 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_200 = atoi(GHIDRA_CAST(pbVar3)); if ((GHIDRA_INT(local_200) < 0) || (0x1e < GHIDRA_INT(local_200))) { local_200 = 0; } atoiFn = atoi_exref; } } uVar5 = FUN_00414410(); if (uVar5 < 2) { LAB_0068fc25: do { itemPool = GHIDRA_CAST((GHIDRA_CAST((g_game)))->Game)::GetItemPool(); uVar5 = Random(); iVar16 = ItemPool::GetCollectible(itemPool,local_200,uVar5,0,0,0); Entity_Player::AddCollectible(player,iVar16,-1,1,0,0,0); iVar4 = iVar4 + -1; } while (iVar4 != 0); } else { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar16 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar16 == 0) goto LAB_0068fc25; pcVar10 = GHIDRA_CAST(FUN_004143f0()); (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); iVar4 = (*atoiFn)(); if (0 < iVar4) goto LAB_0068fc25; } msvc::vector::_Tidy(); goto LAB_0069249e; } pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_20c = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); uVar5 = 1; if (GHIDRA_INT(local_20c) < 1) goto LAB_0069249e; local_204 = GHIDRA_CAST(0x2710); puVar14 = GHIDRA_CAST(std)::min(); local_20c = GHIDRA_CAST(*puVar14); uVar20 = (GHIDRA_CAST((GHIDRA_CAST((entityConfig + 0x1c)))))->Room::GetGridHeight(); if (1 < uVar20) { do { FUN_0060c560(); FUN_00693560(); FUN_0060c420(); iVar16 = FUN_00557b70(); if (iVar16 == -1) break; uVar5 = uVar5 + 1; uVar20 = (GHIDRA_CAST((GHIDRA_CAST((entityConfig + 0x1c)))))->Room::GetGridHeight(); } while (uVar5 < uVar20); player = local_208; } uVar20 = (GHIDRA_CAST((GHIDRA_CAST((entityConfig + 0x1c)))))->Room::GetGridHeight(); if (uVar5 < uVar20) { FUN_0060c560(); FUN_00693560(); pvVar8 = (void *)FUN_0060c420(); (GHIDRA_CAST((local_ac._buf)))->msvc::string::string(pvVar8); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2e; (GHIDRA_CAST((local_ac._buf)))->msvc::string::c_str(); print_format(); iVar16 = 0; if (0 < GHIDRA_INT(local_20c)) { do { RunCommand(entityConfig,&local_ac,GHIDRA_CAST(0x0),player); iVar16 = iVar16 + 1; } while (iVar16 < GHIDRA_INT(local_20c)); } (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Nothing to repeat.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2d; } else { uVar5 = 1; local_1e5 = 1; local_200 = 1; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); iVar16 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); if (1 < iVar16) { do { bVar2 = (GHIDRA_CAST((player)))->Entity_Player::HasCollectible(uVar5,0); if (bVar2 != 0) { if (local_1e5 == 0) { (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(&DAT_00b66304); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2a; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); } (GHIDRA_CAST((player)))->Entity_Player::GetCollectibleNum(uVar5,0); itemConfig = Isaac::GetItemConfig(); configItem = (GHIDRA_CAST((itemConfig)))->ItemConfig::GetCollectible(local_200); psVar9 = ItemConfig_Item::GetLocalizedName (configItem,GHIDRA_CAST((local_5c + 0x10)),0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2b; (GHIDRA_CAST((psVar9->_buf)))->msvc::string::c_str(); print_format(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); local_1e5 = 0; uVar5 = local_200; } uVar5 = uVar5 + 1; local_200 = uVar5; Isaac::GetItemConfig(); pvVar8 = (void *)Config::GetCollectibles(); iVar16 = (GHIDRA_CAST((pvVar8)))->msvc::vector::size(); } while (GHIDRA_INT(uVar5) < iVar16); } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(&DAT_00b66310); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x2c; } } else { uVar5 = FUN_00414410(); if (2 < uVar5) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_21c = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); local_1fc = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); uVar5 = FUN_00414410(); if (uVar5 < 4) { uVar5 = 0xffffffff; } else { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); } if (((local_21c < GHIDRA_CAST(&DAT_0000000d)) && (local_1fc < GHIDRA_CAST(&DAT_0000000d))) && (uVar5 < 3)) { level = GHIDRA_CAST(Config)::GetCollectibles(); local_204 = GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((local_21c)) + 0x0))) + GHIDRA_INT(local_1fc) * 0xd)); roomDesc = (GHIDRA_CAST((level)))->Level::GetRoomByIdx(GHIDRA_INT(local_204),uVar5); if (roomDesc->Data != (void *)0x0) { Game::StartRoomTransition(g_game,GHIDRA_INT(local_204),-1,1,player,uVar5); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Changed room.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xf; goto LAB_0068d95d; } } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Error changing room.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x10; goto LAB_0068d95d; } iVar16 = FUN_00414410(); if (iVar16 != 2) goto LAB_0069249e; FUN_004143f0(); pcVar10 = GHIDRA_CAST(FUN_004170e0()); if (*pcVar10 != '.') goto LAB_0069249e; FUN_004143f0(); pbVar3 = GHIDRA_CAST(FUN_004170e0()); local_1e5 = *pbVar3; if ((local_1e5 == 0x73) || (local_1e5 == 0x78)) { FUN_004143f0(); FUN_00651a90(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x11; string_split(local_c4 + 0xc,&local_ac,0x2e); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x12; psVar9 = GHIDRA_CAST(FUN_004143f0()); local_204 = GHIDRA_CAST(RoomConfig)::GetStageIdByName(psVar9); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x11; msvc::vector::_Tidy(); uVar20 = 0; string_split(&local_70,&local_ac,0x2e); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x13; uVar5 = FUN_00414410(); if (1 < uVar5) { pRVar11 = GHIDRA_CAST(FUN_004143f0()); iVar16 = (GHIDRA_CAST((pRVar11)))->Room::GetGridHeight(); if (iVar16 != 0) { pcVar10 = GHIDRA_CAST(FUN_004143f0()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar20 = atoi(GHIDRA_CAST(pbVar3)); } } roomConfigs = GHIDRA_CAST(FUN_00421790()); if (local_1e5 == 0x78) { game = GHIDRA_CAST(Config)::GetCollectibles(); uVar5 = (GHIDRA_CAST((game)))->Game::GetStageID(0); } else { uVar5 = 0; } roomConfig = RoomConfig::GetRoomByStageTypeAndVariant (roomConfigs,uVar5,GHIDRA_UINT(local_204),uVar20,-1); msvc::vector::_Tidy(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); LAB_0068dccb: if (roomConfig != GHIDRA_CAST(0x0)) { level = GHIDRA_CAST(Config)::GetCollectibles(); (GHIDRA_CAST((level)))->Level::DEBUG_goto_room(roomConfig); (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Changed room.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x14; goto LAB_0068d95d; } } else if (local_1e5 == 100) { FUN_004143f0(); pcVar10 = GHIDRA_CAST(FUN_00651a90()); pbVar3 = (GHIDRA_CAST((pcVar10)))->msvc::string::c_str(); uVar5 = atoi(GHIDRA_CAST(pbVar3)); (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); roomConfigs = GHIDRA_CAST(FUN_00421790()); game = GHIDRA_CAST(Config)::GetCollectibles(); uVar20 = (GHIDRA_CAST((game)))->Game::GetStageID(0); roomConfig = RoomConfig::GetRoomByStageTypeAndVariant(roomConfigs,uVar20,1,uVar5,-1); goto LAB_0068dccb; } (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Error changing room.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x15; } LAB_0068d95d: Print(entityConfig,&local_94,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); goto LAB_0069249e; } (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; FUN_00424510(); local_21c = GHIDRA_CAST(&DAT_00000004); string_split((void *)(iVar16 + 0x18),GHIDRA_CAST(CONCAT31((int3)(GHIDRA_UINT(extraout_EDX) >> 8),0x2e)), (uint8_t)&local_70); local_22c = 0; local_1fc = GHIDRA_CAST(0x0); local_230 = 0; local_1f5 = '\0'; local_1e5 = 0; local_200 = 0xffffffff; iVar16 = GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) >> 0x1f; if (GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18 + iVar16 != iVar16) { pbVar3 = (GHIDRA_CAST((local_70)))->msvc::string::c_str(); local_22c = atoi(GHIDRA_CAST(pbVar3)); } if (1 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { pbVar3 = (GHIDRA_CAST((local_70 + 0x18)))->msvc::string::c_str(); local_1fc = GHIDRA_CAST(atoi(GHIDRA_CAST(pbVar3))); } if (2 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { pbVar3 = (GHIDRA_CAST((local_70 + 0x30)))->msvc::string::c_str(); local_230 = atoi(GHIDRA_CAST(pbVar3)); } if (3 < GHIDRA_UINT((GHIDRA_INT((local_6c - GHIDRA_INT(local_70))) / 0x18))) { iVar16 = 0; while( true ) { while( true ) { pcVar10 = local_70 + 0x48; if (0xf < *GHIDRA_CAST((local_70 + 0x5c))) { pcVar10 = *GHIDRA_CAST(pcVar10); } iVar4 = tolower(GHIDRA_INT(pcVar10[iVar16])); entityConfig = GHIDRA_CAST(local_20c); if ((char)iVar4 != 'f') break; iVar16 = iVar16 + 1; local_1f5 = '\x01'; } if ((char)iVar4 != 'p') break; iVar16 = iVar16 + 1; local_1e5 = 1; } hud = GHIDRA_CAST((local_70 + 0x48)); piVar15 = hud; if (0xf < *GHIDRA_CAST((local_70 + 0x5c))) { piVar15 = GHIDRA_CAST(*hud); } if (*GHIDRA_CAST((GHIDRA_CAST(piVar15) + iVar16)) == '\0') { local_200 = 0xffffffff; } else { local_200 = iVar16; pbVar3 = (GHIDRA_CAST((GHIDRA_CAST(hud))))->msvc::string::c_str(); local_200 = atoi(GHIDRA_CAST((pbVar3 + iVar16))); } } pRVar11 = g_game->_room; posResult = Room::GetCenterPos(&local_218); Room::FindFreePickupSpawnPosition(pRVar11,GHIDRA_CAST((local_c4 + 0x10)),posResult,0.0,0,0,0); pRVar11 = g_game->_room; uVar5 = (GHIDRA_CAST((pRVar11)))->Room::GetGridIndex(GHIDRA_CAST((local_c4 + 0x10))); if (uVar5 < 0x1c0) { pRVar11->_gridPaths[uVar5] = 900; } pEVar18 = GHIDRA_CAST(0x0); local_208 = GHIDRA_CAST(0x0); if (local_22c == 1) { pEVar18 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::SpawnCoPlayerBaby(local_230 - 1); local_208 = pEVar18; tmpPlayer = GHIDRA_CAST(__RTDynamicCast()); (GHIDRA_CAST((tmpPlayer)))->Entity_Player::apply_coop_baby_spawn_bonus(); (GHIDRA_CAST((&g_game->_hud)))->HUD::AssignPlayerHUDs(); } else if (local_22c != 0) { uVar5 = Random(); uStack_27c = 0x68d123; pEVar18 = (Entity_Player *) (GHIDRA_CAST((g_game)))->Game::Spawn(local_22c,GHIDRA_UINT(local_1fc),GHIDRA_CAST((local_c4 + 0x10)),&g_vectorZero ,GHIDRA_CAST(0x0),local_230,uVar5); local_208 = pEVar18; } local_1fc = GHIDRA_CAST(__RTDynamicCast()); if ((local_1fc != GHIDRA_CAST(0x0)) && (-1 < GHIDRA_INT(local_200))) { (GHIDRA_CAST((local_1fc)))->Entity_NPC::Morph(local_1fc->_type,local_1fc->_variant,local_1fc->_subtype,local_200); } if (local_1e5 != 0) { if (player == GHIDRA_CAST(0x0)) { iVar16 = 0; } else { iVar16 = player->_controllerIndex; } local_1fc->_controllerID = iVar16; } if ((pEVar18 == GHIDRA_CAST(0x0)) || (pEVar18->_type == 0)) { local_204 = GHIDRA_CAST(&g_manager->_entityConfig); FUN_006936e0(); FUN_006936e0(); if (local_200 != local_22c) { do { if ((pEVar18 != GHIDRA_CAST(0x0)) && (pEVar18->_type != 0)) goto LAB_0068d54c; local_1fc = GHIDRA_CAST((local_200 + 0x18)); if ((*GHIDRA_CAST(local_1fc) != 5) || ((*GHIDRA_CAST((local_200 + 0x1c)) != 300 || (*GHIDRA_CAST((local_200 + 0x20)) == 0)))) { FUN_0040cca0(); FUN_0040cfe0(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 3; if (1 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { if (local_184 != (basic_string,msvc::allocator_> *) (tokensBegin + 0x18)) { local_230 = local_230 & 0xffffff00; FUN_0040c720(); } if (2 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))) { uVar5 = 2; do { FUN_00421620(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),4); pbVar6 = (basic_string,msvc::allocator_> *) FUN_00651d50(); if (local_184 != pbVar6) { FUN_004215e0(); } (GHIDRA_CAST((local_5c + 0x10)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 3; (GHIDRA_CAST((local_2c._buf)))->msvc::string::_Tidy_deallocate(); uVar5 = uVar5 + 1; } while (uVar5 < GHIDRA_UINT(((tokensEnd - tokensBegin) / 0x18))); entityConfig = GHIDRA_CAST(local_20c); } FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end(local_184); FUN_00684e50(); FUN_00693eb0(); } (GHIDRA_CAST((GHIDRA_CAST(local_1fc))))->EntityConfig_Entity::GetName(&local_ac,0); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 5; FUN_00684e50(); msvc::basic_string,msvc::allocator_>::end ((basic_string,msvc::allocator_> *)&local_ac); FUN_00684e50(); FUN_00693eb0(); iVar16 = FUN_00693650(); if (iVar16 == -1) { pEVar18 = local_208; } else { uVar5 = *GHIDRA_CAST(local_1fc); uVar20 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_1fc)) + 0x4)))); pvVar8 = (GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_1fc)) + 0x8)))))->_begin; uVar7 = Random(); uStack_27c = 0x68d46b; pEVar18 = (Entity_Player *) (GHIDRA_CAST((g_game)))->Game::Spawn(uVar5,uVar20,GHIDRA_CAST((local_c4 + 0x10)),&g_vectorZero, GHIDRA_CAST(0x0),GHIDRA_UINT(pvVar8),uVar7); local_208 = pEVar18; (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Spawned entity.\n")); entityConfig = GHIDRA_CAST(local_20c); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 6; Print(GHIDRA_CAST(local_20c),&local_94,0xffd3d3d3,0x96); (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); } (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST((GHIDRA_CAST(local_184))))->msvc::string::_Tidy_deallocate(); } msvc:: _Tree_unchecked_const_iterator_>,msvc::_Iterator_base0> ::operator++((_Tree_unchecked_const_iterator_>,msvc::_Iterator_base0> *)&local_200); FUN_006936e0(); } while (local_200 != local_22c); } if ((pEVar18 != GHIDRA_CAST(0x0)) && (pEVar18->_type != 0)) goto LAB_0068d54c; (GHIDRA_CAST((local_94._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Error spawning entity.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 7; Print(entityConfig,&local_94,0xffd3d3d3,0x96); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST((local_94._buf)))->msvc::string::_Tidy_deallocate(); if (pEVar18 != GHIDRA_CAST(0x0)) goto LAB_0068d54c; } else { (GHIDRA_CAST((local_ac._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST("Spawned entity.\n")); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 2; Print(entityConfig,&local_ac,0xffd3d3d3,0x96); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST((local_ac._buf)))->msvc::string::_Tidy_deallocate(); LAB_0068d54c: if (local_1f5 != '\0') { (GHIDRA_CAST((GHIDRA_CAST(local_5c))))->EntityRef::constructor(GHIDRA_CAST(0x0)); (GHIDRA_CAST((GHIDRA_CAST(pEVar18))))->Entity::AddCharmed(GHIDRA_CAST(local_5c),-1,0,0); } } msvc::vector::_Tidy(); LAB_0069249e: msvc::vector::_Tidy(); ExceptionList = local_10; return; } // 00692630 void Console::wrap_line(uint32_t *param_1, char param_2) { uint32_t *_Memory; uint16_t *puVar1; uint16_t *ptr; uint64_t qVar2; uint32_t *lineText; uint32_t uVar3; int iVar4; uint16_t *breakDest; void *newBreaks; uint64_t *allocatedBytes; char *charIndex; char *cursor; uint16_t *breaksEnd; uint16_t *local_34; char *local_28; uint16_t *local_24; char *lineStart; int lineWidth; Font *local_18; uint8_t charText [4]; void *local_10; uint8_t *puStack_c; uint32_t local_8; int64_t allocSize; int oldBreaks; puStack_c = &LAB_00af977d; local_10 = ExceptionList; ExceptionList = &local_10; breaksEnd = GHIDRA_CAST(0x0); local_24 = GHIDRA_CAST(0x0); local_34 = GHIDRA_CAST(0x0); charIndex = GHIDRA_CAST(0x0); local_8 = 0; ptr = GHIDRA_CAST(param_1[8]); if (ptr != GHIDRA_CAST(0x0)) { if (param_2 == '\0') { charIndex = GHIDRA_CAST(GHIDRA_UINT(*ptr)); } else { local_8 = 1; tracked_alloc(1,ptr,0); local_8 = local_8 & 0xffffff00; param_1[8] = 0; param_1[9] = 1; } } charText[0] = 0; charText[1] = 0; lineWidth = 0; iVar4 = (g_manager->_optionsConfig)._consoleFont; if (iVar4 == 0) { LAB_006926e9: local_18 = &g_manager->_font4_terminus; } else if (iVar4 == 1) { local_18 = &g_manager->_font5_terminus8; } else { if (iVar4 != 2) goto LAB_006926e9; local_18 = &g_manager->_font8_LuaMiniOutlined; } lineText = param_1; if (0xf < GHIDRA_UINT(param_1[5])) { lineText = GHIDRA_CAST(*param_1); } cursor = charIndex + GHIDRA_INT(lineText); lineStart = charIndex; while( true ) { uVar3 = GHIDRA_UINT(charIndex) & 0xffff; lineText = param_1; if (0xf < GHIDRA_UINT(param_1[5])) { lineText = GHIDRA_CAST(*param_1); } if (cursor == GHIDRA_CAST((param_1[4] + GHIDRA_INT(lineText)))) break; charText[0] = *cursor; iVar4 = Font::get_string_width_n(local_18,charText,-1); lineWidth = lineWidth + iVar4; if (g_screenWidth - 20.0 < (float)((double)lineWidth + __uint_to_double_fixup[-(lineWidth >> 0x1f)])) { local_28 = cursor + -1; while( true ) { charIndex = charIndex + 0xffff; cursor = cursor + -1; if ((uint16_t)charIndex <= (uint16_t)lineStart) break; iVar4 = isspace(GHIDRA_INT(*cursor)); if ((iVar4 != 0) || (iVar4 = ispunct(GHIDRA_INT(*cursor)), iVar4 != 0)) goto LAB_006927ad; } charIndex = GHIDRA_CAST((uVar3 - 1 & 0xffff)); cursor = local_28; LAB_006927ad: lineWidth = 0; local_28 = GHIDRA_CAST((GHIDRA_UINT((charIndex + 1)) & 0xffff)); lineStart = local_28; if (breaksEnd == local_24) { FUN_0042f580(breaksEnd,&local_28); local_24 = GHIDRA_CAST(0x0); lineStart = local_28; breaksEnd = local_34; goto LAB_006927f2; } cursor = cursor + 1; *breaksEnd = (short)(charIndex + 1); breaksEnd = breaksEnd + 1; charIndex = charIndex + 1; local_34 = breaksEnd; } else { LAB_006927f2: cursor = cursor + 1; charIndex = charIndex + 1; } } if (breaksEnd == GHIDRA_CAST(0x0)) { ExceptionList = local_10; return; } iVar4 = GHIDRA_INT(breaksEnd) >> 1; if (param_1[8] != 0) { if (param_2 == '\0') { allocSize = (uint64_t)GHIDRA_UINT((param_1[9] + iVar4)) * 2; breakDest = operator_new_tracked (-GHIDRA_UINT((GHIDRA_INT(((uint64_t)allocSize >> 0x20)) != 0)) | GHIDRA_UINT(allocSize)); memcpy(breakDest + iVar4,(void *)param_1[8],param_1[9] * 2); oldBreaks = param_1[8]; if (oldBreaks != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } uVar3 = *GHIDRA_CAST((oldBreaks + -4)); qVar2 = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - uVar3; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); free((void *)(oldBreaks + -4)); } param_1[9] = param_1[9] + iVar4; param_1[8] = breakDest; goto LAB_00692900; } if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } _Memory = GHIDRA_CAST((param_1[8] + -4)); uVar3 = *_Memory; qVar2 = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - uVar3; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar3)); free(_Memory); local_8 = local_8 & 0xffffff00; } allocSize = (uint64_t)(iVar4 + 1U) * 2; newBreaks = operator_new_tracked (-GHIDRA_UINT((GHIDRA_INT(((uint64_t)allocSize >> 0x20)) != 0)) | GHIDRA_UINT(allocSize)); param_1[8] = newBreaks; *GHIDRA_CAST((GHIDRA_CAST(newBreaks) + iVar4 * 2)) = 0; param_1[9] = iVar4 + 1U; breakDest = GHIDRA_CAST(param_1[8]); LAB_00692900: do { puVar1 = breaksEnd + -1; breaksEnd = breaksEnd + -1; *breakDest = *puVar1; breakDest = breakDest + 1; } while (breaksEnd != GHIDRA_CAST(0x0)); ExceptionList = local_10; return; } // 006929e0 void Console::Print(std_string *text, uint32_t color, uint32_t fadeTime) { uint64_t qVar1; int iVar2; std_string *segmentStart; void *pvVar3; int *extraout_EAX; int *piVar4; Console *pCVar5; std_string *psVar6; uint32_t extraout_ECX; uint64_t *allocatedBytes; uint32_t freeSize; std_string *cursor; Console *pCVar7; uint32_t visibleRange; std_string *local_6c; int slotOffset; uint32_t frontIndex; int addedLineCount; char isScrolledToEnd; char newLine [24]; uint32_t newLineFadeTime; uint32_t newLineColor; int newLineWrapped; uint32_t newLineRowCount; void *emptyText [4]; uint32_t emptyTextSize; uint32_t emptyTextCapacity; uint32_t local_18; void *local_10; uint8_t *puStack_c; void *local_8; bool isPastVisible; char *line; uint32_t *textSize; int wrappedLines; local_8 = (void *)0xffffffff; puStack_c = &LAB_00af97c5; local_10 = ExceptionList; local_18 = __security_cookie ^ GHIDRA_UINT((emptyText + 0xb)); ExceptionList = &local_10; local_6c = text; if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x56])) + 0x2)))) != GHIDRA_CAST(0x0)) { textSize = &text->_size; if (0xf < text->_capacity) { text = *GHIDRA_CAST(text->_buf); } (GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x56])) + 0x2)))))))->msvc::string::append(GHIDRA_CAST(text),*textSize); ExceptionList = local_10; return; } wrappedLines = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))); if ((wrappedLines == 0) || (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { iVar2 = 0; } else { iVar2 = 1; } if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) != iVar2) || (isScrolledToEnd = '\x01', *GHIDRA_CAST((this + 4)) != 0)) { isScrolledToEnd = '\0'; } addedLineCount = 0; if (wrappedLines == 0) { isScrolledToEnd = '\x01'; emptyTextSize = 0; emptyTextCapacity = 0xf; emptyText[0] = (void *)0x0; local_8 = (void *)wrappedLines; (GHIDRA_CAST((newLine)))->msvc::string::string(emptyText); newLineFadeTime = 0x96; newLineColor = 0xffd3d3d3; newLineWrapped = 0; newLineRowCount = 1; local_8 = (void *)CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),1); msvc::deque::push_front(newLine); if (newLineWrapped != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } freeSize = *GHIDRA_CAST((newLineWrapped + -4)); qVar1 = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - freeSize; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(newLineWrapped + -4)); } (GHIDRA_CAST((newLine)))->msvc::string::_Tidy_deallocate(); local_8 = (void *)0xffffffff; if (0xf < emptyTextCapacity) { freeSize = emptyTextCapacity + 1; pvVar3 = emptyText[0]; if (0xfff < freeSize) { pvVar3 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); freeSize = emptyTextCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar3))))) { LAB_00692d88: local_8 = (void *)0xffffffff; /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar3,freeSize); } addedLineCount = 1; } segmentStart = text; if (0xf < text->_capacity) { segmentStart = *GHIDRA_CAST(text->_buf); } do { cursor = segmentStart; while( true ) { psVar6 = text; if (0xf < text->_capacity) { psVar6 = *GHIDRA_CAST(text->_buf); } if (cursor == GHIDRA_CAST((psVar6->_buf + text->_size))) { cursor = text; if (0xf < text->_capacity) { cursor = *GHIDRA_CAST(text->_buf); } textSize = &text->_size; if (segmentStart < GHIDRA_CAST((cursor->_buf + *textSize))) { if (0xf < text->_capacity) { text = *GHIDRA_CAST(text->_buf); } (GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) ) * 4)))))->msvc::string::append(GHIDRA_CAST(segmentStart), GHIDRA_INT(text) + (*textSize - GHIDRA_INT(segmentStart))); *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x1c)) = color; *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x18)) = fadeTime; wrap_line(*(uint32_t *) (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4),0); } if (isScrolledToEnd != '\0') { if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) == 0) || (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = 0; *GHIDRA_CAST((this + 4)) = 0; ExceptionList = local_10; return; } *GHIDRA_CAST((this + 4)) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = 1; ExceptionList = local_10; return; } if (addedLineCount == 0) { ExceptionList = local_10; return; } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) + addedLineCount; get_visible_line_range(this,&visibleRange); if ((*extraout_EAX < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2))))) || ((*extraout_EAX == *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) && (extraout_EAX[1] < *GHIDRA_CAST((this + 4))))) ) { isPastVisible = true; } else { isPastVisible = false; } piVar4 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))); if (isPastVisible) { piVar4 = extraout_EAX; } wrappedLines = *piVar4; *GHIDRA_CAST((this + 4)) = piVar4[1]; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[2])) + 0x2)))) = wrappedLines; pCVar7 = this + 4; local_6c = (std_string *) (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (wrappedLines + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) & *GHIDRA_CAST((this + 0x18)) - 1U) * 4)) + 0x24)) + -1); pCVar5 = GHIDRA_CAST(&local_6c); if (*GHIDRA_CAST(pCVar7) < GHIDRA_INT(local_6c)) { pCVar5 = pCVar7; } wrappedLines = *GHIDRA_CAST(pCVar5); if (wrappedLines < 0) { wrappedLines = 0; } *GHIDRA_CAST(pCVar7) = wrappedLines; ExceptionList = local_10; return; } if (cursor->_buf[0] == 10) break; cursor = GHIDRA_CAST((cursor->_buf + 1)); } if (segmentStart < cursor) { (GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)))))->msvc::string::append(GHIDRA_CAST(segmentStart),GHIDRA_INT(cursor) - GHIDRA_INT(segmentStart)); *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x1c)) = color; *GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x18)) = fadeTime; wrap_line(*(uint32_t *) (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4),0); } freeSize = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))); do { if (freeSize < 0x400) goto LAB_00692c3a; line = *GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) + -1 + freeSize) * 4)); wrappedLines = *GHIDRA_CAST((line + 0x20)); if (wrappedLines != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } freeSize = *GHIDRA_CAST((wrappedLines + -4)); qVar1 = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - freeSize; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(wrappedLines + -4)); } (GHIDRA_CAST((line)))->msvc::string::_Tidy_deallocate(); freeSize = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) - 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) = freeSize; } while (freeSize != 0); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) = 0; LAB_00692c3a: emptyTextSize = 0; emptyTextCapacity = 0xf; emptyText[0] = (void *)0x0; local_8 = (void *)0x4; (GHIDRA_CAST((newLine)))->msvc::string::string(emptyText); newLineFadeTime = 0x96; newLineColor = 0xffd3d3d3; newLineWrapped = 0; newLineRowCount = 1; local_8 = (void *)CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),5); freeSize = *GHIDRA_CAST((this + 0x18)); if (freeSize <= *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) + 1U) { FUN_00693be0(extraout_ECX); freeSize = *GHIDRA_CAST((this + 0x18)); } frontIndex = freeSize - 1 & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) = frontIndex; if (frontIndex == 0) { frontIndex = freeSize; } frontIndex = frontIndex - 1; wrappedLines = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))); slotOffset = (frontIndex & freeSize - 1) * 4; if (*GHIDRA_CAST((slotOffset + wrappedLines)) == 0) { pvVar3 = operator_new(0x28); *(void **)(slotOffset + *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2))))) = pvVar3; wrappedLines = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))); } line = *GHIDRA_CAST((wrappedLines + slotOffset)); (GHIDRA_CAST((line)))->msvc::string::string(newLine); *GHIDRA_CAST((line + 0x18)) = newLineFadeTime; *GHIDRA_CAST((line + 0x1c)) = newLineColor; *GHIDRA_CAST((line + 0x24)) = newLineRowCount; *GHIDRA_CAST((line + 0x20)) = newLineWrapped; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) + 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1)))) = frontIndex; if (newLineWrapped != 0) { if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } freeSize = *GHIDRA_CAST((newLineWrapped + -4)); qVar1 = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - freeSize; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar1) < freeSize)); free((void *)(newLineWrapped + -4)); } (GHIDRA_CAST((newLine)))->msvc::string::_Tidy_deallocate(); local_8 = (void *)0xffffffff; if (0xf < emptyTextCapacity) { freeSize = emptyTextCapacity + 1; pvVar3 = emptyText[0]; if (0xfff < freeSize) { pvVar3 = *(void **)(GHIDRA_INT(emptyText[0]) + -4); freeSize = emptyTextCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyText[0]) + (-4 - GHIDRA_INT(pvVar3))))) goto LAB_00692d88; } operator_delete(pvVar3,freeSize); } addedLineCount = addedLineCount + 1; segmentStart = GHIDRA_CAST((cursor->_buf + 1)); text = local_6c; } while( true ); } // 00692ed0 void Console::PrintError(std_string *err) { void *pvVar1; uint64_t *allocCounter; uint32_t allocSize; char consoleLine [24]; uint32_t lineDuration; uint32_t lineColor; int local_38; uint32_t local_34; void *lineText [4]; uint32_t lineTextSize; uint32_t lineTextCapacity; uint32_t local_18; void *local_10; uint8_t *puStack_c; uint32_t local_8; uint64_t oldAllocated; local_8 = 0xffffffff; puStack_c = &LAB_00af980d; local_10 = ExceptionList; local_18 = __security_cookie ^ GHIDRA_UINT((consoleLine + 0x54)); ExceptionList = &local_10; if ((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x1a])) + 0x2)))) != 0) && (*GHIDRA_CAST((*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x16])) + 0x2)))) + (*GHIDRA_CAST((this + 0x18)) - 1U & *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[0x19])) + 0x1))))) * 4)) + 0x10)) != 0)) { lineTextSize = 0; lineTextCapacity = 0xf; lineText[0] = (void *)0x0; local_8 = 0; (GHIDRA_CAST((consoleLine)))->msvc::string::string(GHIDRA_CAST(lineText)); lineDuration = 0x96; lineColor = 0xffd3d3d3; local_38 = 0; local_34 = 1; local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),1); msvc::deque::push_front(consoleLine); if (local_38 != 0) { if (g_mainHeap == (void *)0x0) { allocCounter = &g_allocatedBytesNoHeap; } else { allocCounter = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } allocSize = *GHIDRA_CAST((local_38 + -4)); oldAllocated = *allocCounter; *GHIDRA_CAST(allocCounter) = GHIDRA_UINT(*allocCounter) - allocSize; *GHIDRA_CAST((GHIDRA_CAST(allocCounter) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocCounter) + 4)) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < allocSize)); free((void *)(local_38 + -4)); } (GHIDRA_CAST((consoleLine)))->msvc::string::_Tidy_deallocate(); local_8 = 0xffffffff; if (0xf < lineTextCapacity) { allocSize = lineTextCapacity + 1; pvVar1 = lineText[0]; if (0xfff < allocSize) { pvVar1 = *(void **)(GHIDRA_INT(lineText[0]) + -4); allocSize = lineTextCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar1,allocSize); } } Print(this,err,0xfff08080,0x96); lineTextCapacity = 0xf; lineTextSize = 1; lineText[0] = (void *)0xa; local_8 = 3; Print(this,GHIDRA_CAST(lineText),0xffd3d3d3,0x96); if (0xf < lineTextCapacity) { allocSize = lineTextCapacity + 1; pvVar1 = lineText[0]; if (0xfff < allocSize) { pvVar1 = *(void **)(GHIDRA_INT(lineText[0]) + -4); allocSize = lineTextCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(lineText[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar1,allocSize); } ExceptionList = local_10; return; } // 00693090 void Console::print_format(Console *param_1, uint32_t param_2) { char *cursor; void *ptr; uint32_t size; std_string local_2c; uint32_t local_14; void *local_10; uint8_t *puStack_c; uint32_t local_8; char *nextChar; local_8 = 0xffffffff; puStack_c = &LAB_00af984d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_INT(&local_2c) + 0x28U; ExceptionList = &local_10; FUN_0041d4d0(param_2); local_2c._size = 0; local_2c._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(local_2c._buf)) + 0x0))) = (void *)0x0; nextChar = &DAT_00c79c68; do { cursor = nextChar; nextChar = cursor + 1; } while (*cursor != '\0'); (GHIDRA_CAST((local_2c._buf)))->msvc::string::assign(&DAT_00c79c68,GHIDRA_UINT((cursor + -0xc79c68))); local_8 = 0; Print(param_1,&local_2c,0xffd3d3d3,0x96); if (0xf < local_2c._capacity) { size = local_2c._capacity + 1; ptr = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)local_2c._buf)) + 0x0))); if (0xfff < size) { ptr = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(local_2c._buf)) + 0x0))) + -4); size = local_2c._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(local_2c._buf)) + 0x0))) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ptr,size); } ExceptionList = local_10; return; }