//
// sub_10045DBE8 from 0x10045dbe8 to 0x10045dc60 (120 bytes)
//
// 2 xrefs:
// > sub_10046C644 @ 0x10046c7b4
// > sub_1004CEE58 @ 0x1004cefc8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_10045DBE8(_QWORD *a1)
{
__int64 v2; // x8
unsigned int *v3; // x8
unsigned int v4; // w9
unsigned int *v5; // x8
unsigned int v6; // w9
__int64 result; // x0
sub_10045C264((__int64)a1, 83);
v2 = a1[14];
if ( !v2 )
goto LABEL_8;
v3 = (unsigned int *)(v2 + 100);
do
v4 = __ldaxr(v3);
while ( __stlxr(v4 & 0xFFFFFFDF, v3) );
v5 = (unsigned int *)(a1[14] + 100LL);
do
v6 = __ldaxr(v5);
while ( __stlxr(v6 & 0xFFFFFFBF, v5) );
result = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[14] + 16LL))(a1[14]);
if ( !(_DWORD)result )
{
a1[14] = 0;
LABEL_8:
a1[12] = 0;
a1[13] = 0;
return 0;
}
return result;
}