//
// sub_C7588 from 0xc7588 to 0xc7670 (232 bytes)
//
// 1 xrefs:
// > sub_C78B0 @ 0xc7950
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:14:46 +0000
//
__int64 __fastcall sub_C7588(__int64 *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, int a6)
{
__int64 v6; // x22
int v8; // w21
int v9; // w20
__int64 v10; // x8
__int64 (*v11)(void); // x8
__int64 result; // x0
__int64 (*v13)(void); // x8
_DWORD *v14; // x8
int v15; // w9
int v16; // w8
v6 = *a1;
if ( a3 )
{
v8 = *(_DWORD *)(a3 + 32);
v9 = **(_DWORD **)(a3 + 8);
}
else
{
v8 = 0;
v9 = 0;
}
v10 = *(_QWORD *)(v6 + 232);
if ( a6 == 1 )
{
v11 = *(__int64 (**)(void))(v10 + 176);
if ( v11 )
{
result = v11();
if ( !a4 )
return result;
}
else
{
result = 0;
if ( !a4 )
return result;
}
v14 = *(_DWORD **)(a4 + 8);
if ( v14 )
{
v15 = *(unsigned __int16 *)(v6 + 280);
if ( !*(_WORD *)(v6 + 280) )
v15 = v9;
*v14 = v15;
}
v16 = *(_DWORD *)(v6 + 196);
if ( !v16 )
v16 = v8;
*(_DWORD *)(a4 + 32) = v16;
}
else
{
v13 = *(__int64 (**)(void))(v10 + 72);
if ( v13 )
{
result = v13();
**(_DWORD **)(a4 + 8) = v9;
}
else
{
return 0;
}
}
return result;
}