//
// sub_61438C from 0x61438c to 0x6143f2 (102 bytes)
//
// 2 xrefs:
// > sub_630064 @ 0x630676
// > sub_63ABD4 @ 0x63abda
//
// 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_61438C(int a1, _BYTE *a2)
{
int result; // r0
int v5; // r4
sub_62E0A4(a1, 0);
result = sub_63C390(a1, 0);
if ( !result )
{
if ( *(_DWORD *)(a1 + 248) != 2 || *(_BYTE *)(a1 + 645) )
{
if ( *(_DWORD *)(a1 + 1252) == 1 )
{
return 0;
}
else if ( (*(_DWORD *)(*(_DWORD *)(a1 + 668) + 64) & 1) != 0 )
{
result = sub_6454E8(a1, 0, a2);
v5 = result;
if ( result )
{
sub_62E0A4(a1, 1);
return v5;
}
}
else
{
*a2 = 1;
return 0;
}
}
else
{
return *(unsigned __int8 *)(a1 + 645);
}
}
return result;
}