Files
isaac-port/generated-src/user_profile.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

46 lines
1.5 KiB
C++

#include "classes.h"
// 00a23ae0
void UserProfile::find_or_create()
{
int existingProfile;
uint8_t emplaceResult [8];
uint32_t keyIdLow;
uint32_t keyIdHigh;
uint32_t local_10;
uint32_t local_c;
char isLockHeld;
void *profileLock;
if (*GHIDRA_CAST<int *>(this) == 0 && *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 0) {
return;
}
existingProfile = FUN_00a23bb0();
if (existingProfile == 0) {
if ((DAT_00c5aa74 & 1) == 0) {
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Trying to lock mutex that has not been initialized"));
}
profileLock = g_userProfileLock;
EnterCriticalSection(g_userProfileLock);
isLockHeld = *GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(profileLock) + 0x18));
while (isLockHeld != '\0') {
Sleep(1000);
isLockHeld = *GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(profileLock) + 0x18));
}
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(profileLock) + 0x18)) = 1;
keyIdLow = *GHIDRA_CAST<uint32_t *>(this);
keyIdHigh = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4));
local_10 = keyIdLow;
local_c = keyIdHigh;
msvc::map<u64_UserProfile>::try_emplace(emplaceResult,&keyIdLow);
if ((DAT_00c5aa74 & 1) == 0) {
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Trying to unlock mutex that has not been initialized"));
}
profileLock = g_userProfileLock;
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(g_userProfileLock) + 0x18)) = 0;
LeaveCriticalSection(profileLock);
FUN_00a23bb0();
}
return;
}