//
// sub_46240 from 0x46240 to 0x46282 (66 bytes)
//
// 0 xrefs:
//
// 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_46240(int a1, int a2, int a3, int a4)
{
int v5; // r0
int result; // r0
int v7; // r4
int v8; // [sp+4h] [bp-14h] BYREF
int v9; // [sp+8h] [bp-10h]
int v10; // [sp+Ch] [bp-Ch]
v8 = a2;
v9 = a3;
v10 = a4;
v5 = *(_DWORD *)(a1 + 128);
if ( !v5 )
return 30;
result = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 28))(v5);
if ( !result )
{
v8 = *(_DWORD *)(a1 + 4);
v9 = 8;
LOBYTE(v10) = 0;
sub_44998((int)&v8);
v7 = sub_44CB0(a1);
sub_448CC((int)&v8);
return v7;
}
return result;
}