//
// sub_1002B5080 from 0x1002b5080 to 0x1002b5139 (185 bytes)
//
// 1 xrefs:
// > ??> @ 0x100902e30
//
// 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_1002B5080(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rcx
int v4; // edx
_DWORD *v5; // rcx
__int64 v6; // rcx
__int64 v7; // rcx
__int64 v8; // rcx
result = *(unsigned int *)(a2 + 56);
v3 = *(_QWORD *)(a1 + 624);
v4 = *(_DWORD *)(v3 + 352);
v5 = (_DWORD *)(v3 + 352);
if ( !*(_BYTE *)(a1 + 617) )
{
if ( v4 == (_DWORD)result )
*v5 = -1;
return result;
}
if ( v4 != (_DWORD)result )
{
v6 = *(_QWORD *)(a1 + 632);
if ( *(_DWORD *)(v6 + 352) != (_DWORD)result )
goto LABEL_4;
LABEL_10:
*(_DWORD *)(v6 + 352) = -1;
v7 = *(_QWORD *)(a1 + 640);
if ( *(_DWORD *)(v7 + 352) != (_DWORD)result )
{
LABEL_5:
v8 = *(_QWORD *)(a1 + 648);
if ( *(_DWORD *)(v8 + 352) != (_DWORD)result )
return result;
LABEL_12:
*(_DWORD *)(v8 + 352) = -1;
return result;
}
goto LABEL_11;
}
*v5 = -1;
v6 = *(_QWORD *)(a1 + 632);
if ( *(_DWORD *)(v6 + 352) == (_DWORD)result )
goto LABEL_10;
LABEL_4:
v7 = *(_QWORD *)(a1 + 640);
if ( *(_DWORD *)(v7 + 352) != (_DWORD)result )
goto LABEL_5;
LABEL_11:
*(_DWORD *)(v7 + 352) = -1;
v8 = *(_QWORD *)(a1 + 648);
if ( *(_DWORD *)(v8 + 352) == (_DWORD)result )
goto LABEL_12;
return result;
}