//
// sub_780FF4 from 0x780ff4 to 0x781026 (50 bytes)
//
// 2 xrefs:
// > sub_780FDC @ 0x780ff0
// > sub_77FFBE @ 0x780458
//
// 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_780FF4(int a1, int a2, int a3, int a4)
{
_DWORD *v4; // r4
int v5; // r7
_DWORD *v6; // r8
_DWORD *v7; // r8
int v8; // r1
v4[3] = a4 + 2;
v5 = sub_77D87C((int)v4);
v6 = sub_77E8CC((int)v4);
if ( *(_BYTE *)v4[3] == 73 )
JUMPOUT(0x781034);
v7 = sub_77BD98(v4, 1, v5, (int)v6);
sub_780050((int)v7, v8, *(unsigned __int8 *)v4[3], v4[3]);
return sub_781026();
}