--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93 lines
3.2 KiB
C++
93 lines
3.2 KiB
C++
#include "classes.h"
|
|
|
|
// 009c6c90
|
|
void PreloadManager::load_group(std_string *groupName)
|
|
{
|
|
uint32_t uVar1;
|
|
uint32_t uVar2;
|
|
std_string *psVar3;
|
|
char cVar4;
|
|
uint8_t *path;
|
|
void *pvVar5;
|
|
uint32_t *puVar6;
|
|
uint8_t *pbVar7;
|
|
uint8_t auStackY_cc [128];
|
|
int *imageRefCount;
|
|
uint8_t loadedImage [4];
|
|
int *loadedImageRefCount;
|
|
uint8_t swapImage [4];
|
|
int *swapImageRefCount;
|
|
void *entryImage;
|
|
int *entryImageRefCount;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
psVar3 = groupName;
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b0f05d;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
msvc::map<msvc::string>::find();
|
|
if ((groupName != *GHIDRA_CAST<std_string **>(this)) && ((char)groupName[1]._size == '\0')) {
|
|
pbVar7 = GHIDRA_CAST<uint8_t *>(groupName[2]._capacity);
|
|
if (pbVar7 != *GHIDRA_CAST<uint8_t **>(groupName[3]._buf)) {
|
|
groupName = GHIDRA_CAST<std_string *>((pbVar7 + 0x1c));
|
|
do {
|
|
path = pbVar7;
|
|
if (0xf < groupName[-1]._size) {
|
|
path = *GHIDRA_CAST<uint8_t **>(pbVar7);
|
|
}
|
|
pvVar5 = Manager::LoadImage(loadedImage,path);
|
|
local_8 = 0;
|
|
puVar6 = (GHIDRA_CAST<KAGE::SmartPointer *>((swapImage)))->KAGE::SmartPointer::operator_assign(pvVar5);
|
|
uVar1 = puVar6[1];
|
|
puVar6[1] = *GHIDRA_CAST<uint32_t *>(groupName->_buf);
|
|
uVar2 = groupName[-1]._capacity;
|
|
*GHIDRA_CAST<uint32_t *>(groupName->_buf) = uVar1;
|
|
uVar1 = *puVar6;
|
|
*puVar6 = uVar2;
|
|
groupName[-1]._capacity = uVar1;
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),1);
|
|
if (swapImageRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar4 = (**(code **)(*swapImageRefCount + 0xc))();
|
|
if ((cVar4 != '\0') && (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)();
|
|
}
|
|
}
|
|
local_8 = 2;
|
|
if (loadedImageRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar4 = (**(code **)(*loadedImageRefCount + 0xc))();
|
|
if ((cVar4 != '\0') && (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)();
|
|
}
|
|
}
|
|
local_8 = 0xffffffff;
|
|
pvVar5 = (void *)0x0;
|
|
imageRefCount = GHIDRA_CAST<int *>(0x0);
|
|
entryImageRefCount = *GHIDRA_CAST<int **>(groupName->_buf);
|
|
entryImage = (void *)groupName[-1]._capacity;
|
|
if (entryImageRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar4 = (**(code **)(*entryImageRefCount + 4))();
|
|
if (cVar4 != '\0') {
|
|
if (imageRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar4 = (**(code **)(*imageRefCount + 0xc))();
|
|
if ((cVar4 != '\0') && (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)(auStackY_cc + 0x84);
|
|
}
|
|
}
|
|
pvVar5 = entryImage;
|
|
imageRefCount = entryImageRefCount;
|
|
}
|
|
}
|
|
TextureCache::Add(pvVar5,imageRefCount);
|
|
pbVar7 = pbVar7 + 0x20;
|
|
groupName = GHIDRA_CAST<std_string *>((groupName[1]._buf + 8));
|
|
} while (pbVar7 != *GHIDRA_CAST<uint8_t **>(psVar3[3]._buf));
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>(&psVar3[1]._size) = 1;
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|