//
// sub_640FA0 from 0x640fa0 to 0x640fe4 (68 bytes)
//
// 2 xrefs:
// > sub_631FF8 @ 0x632002
// > sub_631FF8 @ 0x632010
//
// 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_640FA0(int a1)
{
void (*v2)(void *); // r3
void *v3; // r0
void (*v4)(void *); // r3
void *v5; // r0
void (*v6)(void *); // r3
void *v7; // r0
void (*v8)(void *); // r3
int result; // r0
off_ABAEB0(*(void **)a1);
*(_DWORD *)a1 = 0;
off_ABAEB0(*(void **)(a1 + 4));
v2 = off_ABAEB0;
v3 = *(void **)(a1 + 8);
*(_DWORD *)(a1 + 4) = 0;
v2(v3);
v4 = off_ABAEB0;
v5 = *(void **)(a1 + 20);
*(_DWORD *)(a1 + 8) = 0;
v4(v5);
v6 = off_ABAEB0;
v7 = *(void **)(a1 + 24);
*(_DWORD *)(a1 + 20) = 0;
v6(v7);
v8 = off_ABAEB0;
*(_DWORD *)(a1 + 24) = 0;
result = ((int (__fastcall *)(_DWORD))v8)(*(_DWORD *)(a1 + 28));
*(_DWORD *)(a1 + 28) = 0;
*(_DWORD *)(a1 + 32) = 0;
*(_DWORD *)(a1 + 12) = 0;
*(_BYTE *)(a1 + 16) = 0;
return result;
}