//
// sub_100405DE4 from 0x100405de4 to 0x100405e68 (132 bytes)
//
// 1 xrefs:
// > sub_100405D0C @ 0x100405d98
//
// 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 11:04:41 +0000
//
__int64 __fastcall sub_100405DE4(__int64 result, __int64 a2, __int64 a3)
{
__int64 v3; // x19
unsigned int *v4; // x9
__int64 v5; // x8
__int64 *v6; // x20
unsigned __int64 v7; // x21
if ( *(_QWORD *)(result + 14120) )
{
v3 = result;
if ( a2 )
{
return sub_100405BC8(result, a2, *(_QWORD *)(result + 14120));
}
else if ( a3 )
{
v4 = *(unsigned int **)(a3 + 56);
v5 = *v4;
if ( (_DWORD)v5 )
{
v6 = *((__int64 **)v4 + 2);
v7 = (unsigned __int64)&v6[v5 - 1];
do
{
if ( !*v6 )
break;
result = sub_100405BC8(v3, *v6++, *(_QWORD *)(v3 + 14120));
}
while ( (unsigned __int64)v6 <= v7 );
}
}
}
return result;
}