//
// sub_759314 from 0x759314 to 0x7593aa (150 bytes)
//
// 0 xrefs:
//
// 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
//
int *__fastcall sub_759314(int *a1, int a2)
{
int v4; // r3
int v5; // r0
int v6; // r1
char *v7; // r5
int v8; // r0
char v10; // [sp+7h] [bp-9h] BYREF
_BYTE v11[4]; // [sp+8h] [bp-8h] BYREF
_DWORD *v12; // [sp+Ch] [bp-4h]
sub_75928C((int)v11, a1);
if ( a2 )
v4 = v11[0] & 1;
else
v4 = 0;
if ( !v4 )
{
if ( a2 )
goto LABEL_6;
v6 = 1;
LABEL_13:
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), v6 | *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20));
goto LABEL_6;
}
v5 = sub_76174C(a2, *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120), &v10);
v6 = 4;
if ( !v5 )
goto LABEL_13;
LABEL_6:
v7 = (char *)v12 + *(_DWORD *)(*v12 - 12);
if ( (*((_DWORD *)v7 + 3) & 0x2000) == 0 )
return a1;
if ( std::uncaught_exception() )
return a1;
v8 = *((_DWORD *)v7 + 30);
if ( !v8 || (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 24))(v8) != -1 )
return a1;
sub_7446A4(
(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12)),
*(_DWORD *)((char *)v12 + *(_DWORD *)(*v12 - 12) + 20) | 1);
return a1;
}