Six agents took over ANM2/AnimationState/LayerState, ItemConfig, EntityConfig, StringTable/Font/FormattedText/RichText, OptionsConfig/ChallengeParams and ModManager/ModEntry functions (FormattedText::parse checked against a transliteration of its assembly on 200,000 random inputs). 174 field rows and 32 names from the round are merged into db/. source_tree.py: a struct or class src/*.h defines is no longer emitted in classes.h (class takeover) and gets no stubs; data labels get stub definitions. build/isaac links (64-bit ELF) and stops at the first function not reconstructed: IsaacMain. Boot path 64/615 functions curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
105 lines
4.2 KiB
C++
105 lines
4.2 KiB
C++
#include "classes.h"
|
|
|
|
// 008f9cb0
|
|
void Mod::load_menu_sprites()
|
|
{
|
|
uint8_t bVar1;
|
|
uint64_t qVar2;
|
|
uint8_t *pbVar3;
|
|
std_string *path;
|
|
uint8_t *pbVar4;
|
|
void *in_ECX;
|
|
void *pvVar5;
|
|
uint32_t uVar6;
|
|
uint64_t *allocCounter;
|
|
uint32_t pathTableOffset;
|
|
ANM2 *sprite;
|
|
std_string contentPath;
|
|
std_string relativePath;
|
|
uint32_t local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xff;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0xffffff;
|
|
puStack_c = &LAB_00b07ba5;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_INT(&relativePath) + 0x28U;
|
|
ExceptionList = &local_10;
|
|
sprite = GHIDRA_CAST<ANM2 *>((GHIDRA_INT(in_ECX) + 0x100));
|
|
pathTableOffset = 0;
|
|
do {
|
|
pbVar4 = *GHIDRA_CAST<uint8_t **>((GHIDRA_INT(&PTR_s_gfx_CharacterMenu_anm2_00b240c0) + pathTableOffset));
|
|
if (pbVar4 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
relativePath._size = 0;
|
|
relativePath._capacity = 0xf;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(relativePath._buf)) + 0x0))) = (void *)0x0;
|
|
pbVar3 = pbVar4;
|
|
do {
|
|
bVar1 = *pbVar3;
|
|
pbVar3 = pbVar3 + 1;
|
|
} while (bVar1 != 0);
|
|
(GHIDRA_CAST<msvc::string *>((relativePath._buf)))->msvc::string::assign(pbVar4,GHIDRA_INT(pbVar3) - GHIDRA_INT((pbVar4 + 1)));
|
|
local_8 = 0;
|
|
GetContentPath(in_ECX,&contentPath,&relativePath);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 2;
|
|
if (0xf < relativePath._capacity) {
|
|
uVar6 = relativePath._capacity + 1;
|
|
pvVar5 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((void *)relativePath._buf)) + 0x0)));
|
|
if (0xfff < uVar6) {
|
|
pvVar5 = *(void **)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(relativePath._buf)) + 0x0))) + -4);
|
|
uVar6 = relativePath._capacity + 0x24;
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(relativePath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar5))))) goto LAB_008f9e44;
|
|
}
|
|
operator_delete(pvVar5,uVar6);
|
|
}
|
|
path = &contentPath;
|
|
if (0xf < contentPath._capacity) {
|
|
path = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(contentPath._buf))) + 0x0)));
|
|
}
|
|
pbVar4 = FileSystem::ResolvePath(GHIDRA_CAST<uint8_t *>(path));
|
|
if (pbVar4 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
if (g_mainHeap == (void *)0x0) {
|
|
allocCounter = &g_allocatedBytesNoHeap;
|
|
}
|
|
else {
|
|
allocCounter = GHIDRA_CAST<uint64_t *>((GHIDRA_INT(g_mainHeap) + 0x30));
|
|
}
|
|
uVar6 = *GHIDRA_CAST<uint32_t *>((pbVar4 + -4));
|
|
qVar2 = *allocCounter;
|
|
*GHIDRA_CAST<uint32_t *>(allocCounter) = GHIDRA_UINT(*allocCounter) - uVar6;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocCounter) + 4)) =
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocCounter) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar2) < uVar6));
|
|
free(pbVar4 + -4);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 2;
|
|
}
|
|
if (pbVar4 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
(GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::Load(&contentPath,1);
|
|
}
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xff;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0xffffff;
|
|
if (0xf < contentPath._capacity) {
|
|
uVar6 = contentPath._capacity + 1;
|
|
pvVar5 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((void *)contentPath._buf)) + 0x0)));
|
|
if (0xfff < uVar6) {
|
|
pvVar5 = *(void **)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(contentPath._buf)) + 0x0))) + -4);
|
|
uVar6 = contentPath._capacity + 0x24;
|
|
if (0x1f < ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(contentPath._buf)) + 0x0))) - GHIDRA_INT(pvVar5)) - 4U) {
|
|
LAB_008f9e44:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pvVar5,uVar6);
|
|
}
|
|
}
|
|
pathTableOffset = pathTableOffset + 4;
|
|
sprite = sprite + 1;
|
|
if (0x33 < pathTableOffset) {
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
} while( true );
|
|
}
|