//
// sub_C1E58 from 0xc1e58 to 0xc1ed6 (126 bytes)
//
// 1 xrefs:
// > sub_C1BBC @ 0xc1bc2
//
// 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_C1E58(_DWORD *a1, int a2, int a3, int a4)
{
_DWORD *v4; // r1
int v6; // r5
int v7; // r1
int v9; // [sp+4h] [bp-Ch] BYREF
v9 = a4;
v4 = (_DWORD *)a1[210];
if ( v4 )
{
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v4);
a1[210] = 0;
}
v9 = 0;
v6 = sub_BFE7C((int)&v9);
if ( !v6 )
{
if ( a1[205] )
{
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 88))(v9);
a1[205] = 0;
}
v7 = a1[204];
if ( v7 )
{
if ( a1[208] )
{
sub_C1EE0(v9);
a1[208] = 0;
v7 = a1[204];
}
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 88))(v9, v7);
a1[204] = 0;
}
}
return v6;
}