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

61 lines
1.7 KiB
C++

#include "classes.h"
// 00aaaf50
void Mutex::lock()
{
uint8_t bVar1;
uint32_t uVar2;
uint8_t *messageEnd;
void *allocBase;
void *message [4];
uint32_t messageSize;
uint32_t messageCapacity;
uint8_t buffer [1024];
uint32_t local_14;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
local_8 = 0xffffffff;
puStack_c = &LAB_00b14fd0;
local_10 = ExceptionList;
uVar2 = __security_cookie ^ GHIDRA_UINT((buffer + 0x410));
ExceptionList = &local_10;
local_14 = uVar2;
EnterCriticalSection(*GHIDRA_CAST<LPCRITICAL_SECTION *>(this));
if (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this) + 4)) == '\0') {
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 4)) = 1;
ExceptionList = local_10;
return;
}
memset(buffer,0,0x400);
sprintf(buffer,GHIDRA_CAST<uint8_t *>("WARNING: \'<0x%p>\' is deadlocked!"));
messageEnd = buffer;
messageSize = 0;
messageCapacity = 0xf;
message[0] = (void *)0x0;
do {
bVar1 = *messageEnd;
messageEnd = messageEnd + 1;
} while (bVar1 != 0);
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(message))))->msvc::string::assign(buffer,GHIDRA_INT(messageEnd) - GHIDRA_INT((buffer + 1)));
local_8 = 0;
(*(code *)PTR_FUN_00c5aa7c)(message,uVar2);
if (0xf < messageCapacity) {
uVar2 = messageCapacity + 1;
allocBase = message[0];
if (0xfff < uVar2) {
allocBase = *(void **)(GHIDRA_INT(message[0]) + -4);
uVar2 = messageCapacity + 0x24;
if (0x1f < GHIDRA_UINT((GHIDRA_INT(message[0]) + (-4 - GHIDRA_INT(allocBase))))) {
/* WARNING: Subroutine does not return */
_invalid_parameter_noinfo_noreturn();
}
}
operator_delete(allocBase,uVar2);
}
do {
Sleep(1);
} while( true );
}