//
// sub_780EEC from 0x780eec to 0x780fa4 (184 bytes)
//
// 2 xrefs:
// > sub_780D66 @ 0x780ee8
// > sub_77FFEE @ 0x78001a
//
// 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_780EEC(int a1)
{
_DWORD *v1; // r4
int v2; // r7
const char **v3; // r3
const char *v4; // r8
int v5; // r3
int v6; // r3
_BYTE *v7; // r3
_DWORD *v8; // r0
_DWORD *v9; // r0
int v10; // r2
int v11; // r0
int v12; // r2
int v13; // r0
v3 = *(const char ***)(a1 + 4);
v4 = *v3;
v1[12] += v3[2] - 2;
if ( !strcmp(v4, "st") )
goto LABEL_13;
v5 = *(_DWORD *)(*(_DWORD *)(v2 + 4) + 12);
if ( v5 != 1 )
{
if ( v5 > 1 )
{
if ( v5 == 2 )
JUMPOUT(0x780E1E);
JUMPOUT(0x780D7C);
}
JUMPOUT(0x780EDC);
}
v6 = *(unsigned __int8 *)v4;
if ( v6 != 109 && v6 != 112 )
sub_780038();
if ( *((unsigned __int8 *)v4 + 1) != v6 )
sub_780038();
v7 = (_BYTE *)v1[3];
if ( *v7 != 95 )
{
v8 = sub_77F4C0(v1);
v9 = sub_77BD98(v1, 56, (int)v8, (int)v8);
sub_780044(v1, 54, v10, (int)v9);
LABEL_13:
v11 = sub_77D87C((int)v1);
sub_780044(v1, 54, v12, v11);
}
v1[3] = v7 + 1;
v13 = sub_780038();
return sub_780FA4(v13);
}