//
// sub_10020E748 from 0x10020e748 to 0x10020e884 (316 bytes)
//
// 4 xrefs:
// > sub_10020E0CC @ 0x10020e59c
// > sub_10020E0CC @ 0x10020e66c
// > sub_10020F4C0 @ 0x10020f568
// > sub_10020F4C0 @ 0x10020f650
//
// 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
//
__int64 __fastcall sub_10020E748(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 (__fastcall **a5)(__int64, __int64))
{
char v10; // w24
int v11; // w0
__int64 v12; // x0
__int64 v13; // x1
__int64 result; // x0
v10 = (*a5)(a2, a1);
v11 = (*a5)(a3, a2);
if ( (v10 & 1) != 0 )
{
if ( v11 )
{
v12 = a1;
LABEL_9:
v13 = a3;
goto LABEL_10;
}
sub_10020F9DC(a1, a2);
if ( (unsigned int)(*a5)(a3, a2) )
{
v12 = a2;
goto LABEL_9;
}
}
else if ( v11 )
{
sub_10020F9DC(a2, a3);
if ( (unsigned int)(*a5)(a2, a1) )
{
v12 = a1;
v13 = a2;
LABEL_10:
sub_10020F9DC(v12, v13);
}
}
result = (*a5)(a4, a3);
if ( (_DWORD)result )
{
sub_10020F9DC(a3, a4);
result = (*a5)(a3, a2);
if ( (_DWORD)result )
{
sub_10020F9DC(a2, a3);
result = (*a5)(a2, a1);
if ( (_DWORD)result )
return sub_10020F9DC(a1, a2);
}
}
return result;
}