Files
isaac-port/generated-src/kage/system/leaderboard_manager.cpp
T
shweetandClaude Opus 5.5 9d4d4f5c64 Build 29: zero-length placeholder structs, generated-src with standard types
--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>
2026-11-19 21:41:34 -05:00

106 lines
3.4 KiB
C++

#include "classes.h"
// 00a51790
int KAGE::System::LeaderboardManager::get_result(uint32_t handle)
{
int result;
uint8_t findResult [8];
int foundNode;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
uint32_t key;
key = handle;
local_8 = 0xffffffff;
puStack_c = &LAB_00af0eb0;
local_10 = ExceptionList;
if (handle == 0) {
return 0;
}
ExceptionList = &local_10;
(**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((findResult + 0x18)));
_Find_lower_bound<>(findResult,&handle);
if (((*GHIDRA_CAST<char *>((foundNode + 0xd)) == '\0') && (*GHIDRA_CAST<uint32_t *>((foundNode + 0x10)) <= key)) &&
(foundNode != DAT_00c5ab18)) {
result = *GHIDRA_CAST<int *>((foundNode + 0x14));
}
else {
result = 0;
}
local_8 = 0;
(**(code **)(DAT_00c5ab20 + 0x10))();
ExceptionList = local_10;
return result;
}
// 00a51840
void KAGE::System::LeaderboardManager::release_result(int handle)
{
int iVar1;
void *pvVar2;
int *mapHead;
uint8_t foundIter [8];
int *foundNode;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
iVar1 = handle;
local_8 = 0xffffffff;
puStack_c = &LAB_00b122d0;
local_10 = ExceptionList;
ExceptionList = &local_10;
if ((((uint8_t)DAT_00c5ab14 & 1) != 0) && (handle != 0)) {
(**(code **)(DAT_00c5ab20 + 0xc))(0xffffffff,__security_cookie ^ GHIDRA_UINT((foundIter + 0x18)));
if (iVar1 == -1) {
handle = *DAT_00c5ab18;
mapHead = DAT_00c5ab18;
if (GHIDRA_CAST<int *>(handle) != DAT_00c5ab18) {
do {
iVar1 = handle;
pvVar2 = *(void **)(handle + 0x14);
if (pvVar2 != (void *)0x0) {
if (*(void **)(GHIDRA_CAST<char *>(pvVar2) + 4) != (void *)0x0) {
local_8 = 0;
tracked_alloc(1,*(void **)(GHIDRA_CAST<char *>(pvVar2) + 4),0);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(pvVar2) + 4)) = 0;
}
operator_delete(pvVar2,0x18);
*GHIDRA_CAST<uint32_t *>((iVar1 + 0x14)) = 0;
mapHead = DAT_00c5ab18;
}
msvc::
_Tree_unchecked_const_iterator<msvc::_Tree_val<msvc::_Tree_simple_types<unsigned_int>_>,msvc::_Iterator_base0>
::operator++((_Tree_unchecked_const_iterator<msvc::_Tree_val<msvc::_Tree_simple_types<unsigned_int>_>,msvc::_Iterator_base0>
*)&handle);
} while (GHIDRA_CAST<int *>(handle) != mapHead);
}
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
(&DAT_00c5ab18,
(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)&DAT_00c5ab18,
(_Tree_node<unsigned_int,void*> *)mapHead[1]);
mapHead[1] = GHIDRA_INT(mapHead);
*mapHead = GHIDRA_INT(mapHead);
mapHead[2] = GHIDRA_INT(mapHead);
_DAT_00c5ab1c = 0;
}
else {
_Find_lower_bound<>(foundIter,&handle);
if (((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(foundNode) + 0xd)) == '\0') && (GHIDRA_UINT(foundNode[4]) <= GHIDRA_UINT(iVar1))) &&
(foundNode != DAT_00c5ab18)) {
if (foundNode[5] != 0) {
FUN_008d0bc0(foundNode[5]);
foundNode[5] = 0;
}
pvVar2 = std_tree_extract(&DAT_00c5ab18,foundNode);
operator_delete(pvVar2,0x18);
}
}
local_8 = 2;
(**(code **)(DAT_00c5ab20 + 0x10))();
}
ExceptionList = local_10;
return;
}