//
// sub_1002A2E80 from 0x1002a2e80 to 0x1002a2f39 (185 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b09f20
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:27:55 +0000
//
__int64 __fastcall sub_1002A2E80(__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 + 696);
v4 = *(_DWORD *)(v3 + 352);
v5 = (_DWORD *)(v3 + 352);
if ( !*(_BYTE *)(a1 + 692) )
{
if ( v4 == (_DWORD)result )
*v5 = -1;
return result;
}
if ( v4 != (_DWORD)result )
{
v6 = *(_QWORD *)(a1 + 704);
if ( *(_DWORD *)(v6 + 352) != (_DWORD)result )
goto LABEL_4;
LABEL_10:
*(_DWORD *)(v6 + 352) = -1;
v7 = *(_QWORD *)(a1 + 712);
if ( *(_DWORD *)(v7 + 352) != (_DWORD)result )
{
LABEL_5:
v8 = *(_QWORD *)(a1 + 720);
if ( *(_DWORD *)(v8 + 352) != (_DWORD)result )
return result;
LABEL_12:
*(_DWORD *)(v8 + 352) = -1;
return result;
}
goto LABEL_11;
}
*v5 = -1;
v6 = *(_QWORD *)(a1 + 704);
if ( *(_DWORD *)(v6 + 352) == (_DWORD)result )
goto LABEL_10;
LABEL_4:
v7 = *(_QWORD *)(a1 + 712);
if ( *(_DWORD *)(v7 + 352) != (_DWORD)result )
goto LABEL_5;
LABEL_11:
*(_DWORD *)(v7 + 352) = -1;
v8 = *(_QWORD *)(a1 + 720);
if ( *(_DWORD *)(v8 + 352) == (_DWORD)result )
goto LABEL_12;
return result;
}