//
// sub_9DE44 from 0x9de44 to 0x9df00 (188 bytes)
//
// 1 xrefs:
// > sub_9DC5C @ 0x9dc5e
//
// 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_9DE44(int a1, int a2, int a3, int a4, int a5, int a6)
{
int result; // r0
int v11; // r0
int v12; // r0
int v14; // r1
int v15; // r0
int v16; // r0
int (__fastcall *v17)(int, int, int, int, int, int); // r12
int v18; // r2
int v19; // [sp+8h] [bp-18h] BYREF
int v20; // [sp+Ch] [bp-14h] BYREF
if ( a6 == 1 )
{
result = sub_9DF00(a1, a2, a2);
if ( a4 && a3 && !result )
{
if ( *(_DWORD *)(a1 + 480) )
{
v11 = *(unsigned __int16 *)(a1 + 192);
**(_DWORD **)(a4 + 4) = v11;
v12 = sub_58478(v11);
if ( v12 != 1 )
*(_DWORD *)(a4 + 16) = v12;
return 0;
}
else
{
sub_AAE82(*(_DWORD *)(*(_DWORD *)(a1 + 484) + 88), &v20, 0, 0);
v15 = *(_DWORD *)(a1 + 484);
if ( v15
&& (v16 = *(_DWORD *)(v15 + 88),
(v17 = *(int (__fastcall **)(int, int, int, int, int, int))(v16 + 200)) != nullptr)
&& !v20 )
{
*(_DWORD *)(v16 + 132) = v16;
result = v17(v16 + 132, a2, a3, a4, a5, 1);
v18 = *(unsigned __int16 *)(a1 + 192);
if ( !*(_WORD *)(a1 + 192) )
v18 = *(_DWORD *)(*(_DWORD *)(a1 + 128) + 1188);
if ( **(_DWORD **)(a4 + 4) != v18 )
return 6;
}
else
{
return 6;
}
}
}
}
else
{
v14 = **(_DWORD **)(a4 + 12);
v19 = **(_DWORD **)(a4 + 4);
return sub_9DF28(a1, v14, &v19, a2);
}
return result;
}