//
// sub_621378 from 0x621378 to 0x6213f6 (126 bytes)
//
// 1 xrefs:
// > sub_630064 @ 0x63062e
//
// 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_621378(int a1, _BYTE *a2)
{
int result; // r0
int (__fastcall *v5)(int, _BYTE *); // r3
*a2 = 0;
if ( *(_BYTE *)(a1 + 625) )
{
if ( *(_BYTE *)(a1 + 627) )
{
result = *(_DWORD *)(*(_DWORD *)(a1 + 664) + 24);
if ( !result )
{
*a2 = 1;
return result;
}
return 0;
}
}
else if ( *(_BYTE *)(a1 + 627) )
{
return 0;
}
result = sub_63C390(a1, 0);
if ( result )
return result;
if ( *(_DWORD *)(a1 + 248) == 2 && !*(_BYTE *)(a1 + 645)
|| *(_BYTE *)(a1 + 629) && *(_BYTE *)(a1 + 618) && *(_DWORD *)(a1 + 1252) != 2 )
{
return 0;
}
v5 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)(a1 + 664) + 20);
if ( v5 )
{
result = v5(a1, a2);
if ( result )
return result;
}
else
{
*a2 = 1;
}
result = 0;
*(_BYTE *)(a1 + 627) = 1;
return result;
}