//
// sub_639564 from 0x639564 to 0x6395e0 (124 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_639564(int a1, int a2)
{
int v3; // r3
int v4; // r5
_BOOL4 v6; // r0
if ( a2 || (v3 = *(_DWORD *)(a1 + 1132)) == 0 )
{
v4 = a1 + 1088;
}
else
{
v4 = a1 + 1088;
if ( *(_BYTE *)(v3 + 627) && !sub_63A7E4(a1 + 1088, "%s", "QUIT") )
{
*(_DWORD *)(a1 + 1144) = 12;
do
{
v6 = sub_63A580(v4, 1) == 0;
if ( !*(_DWORD *)(a1 + 1144) )
v6 = 0;
}
while ( v6 );
}
}
sub_63AB48(v4);
sub_63D640(a1, *(_DWORD *)(a1 + 1172));
off_ABAEB0(*(void **)(a1 + 1152));
*(_DWORD *)(a1 + 1152) = 0;
return 0;
}