//
// sub_100211424 from 0x100211424 to 0x1002114f0 (204 bytes)
//
// 1 xrefs:
// > sub_100210984 @ 0x100211098
//
// 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_100211424(__int64 result, _OWORD *a2, __int64 (__fastcall **a3)(_OWORD *, _QWORD))
{
__int64 v3; // x29
__int64 v4; // x30
_OWORD *v6; // x21
_OWORD *v7; // x8
__int64 v9; // x23
_OWORD *v10; // x22
_OWORD *v11; // x1
__int128 v12; // q1
__int64 v13; // x24
char *v14; // x8
__int128 v15; // q1
_OWORD *v16; // x8
__int128 v17; // q1
__int128 v18; // [xsp+0h] [xbp-60h] BYREF
__int128 v19; // [xsp+10h] [xbp-50h]
__int64 v20; // [xsp+50h] [xbp-10h]
__int64 v21; // [xsp+58h] [xbp-8h]
if ( (_OWORD *)result != a2 )
{
v20 = v3;
v21 = v4;
v6 = (_OWORD *)result;
v7 = (_OWORD *)(result + 32);
if ( (_OWORD *)(result + 32) != a2 )
{
v9 = 0;
v10 = (_OWORD *)result;
do
{
v11 = v10;
v10 = v7;
result = (*a3)(v7, v11);
if ( (_DWORD)result )
{
v12 = v10[1];
v18 = *v10;
v19 = v12;
v13 = v9;
while ( 1 )
{
v14 = (char *)v6 + v13;
v15 = *(_OWORD *)((char *)v6 + v13 + 16);
*((_OWORD *)v14 + 2) = *(_OWORD *)((char *)v6 + v13);
*((_OWORD *)v14 + 3) = v15;
if ( !v13 )
break;
v13 -= 32;
result = (*a3)(&v18, (char *)v6 + v13);
if ( (result & 1) == 0 )
{
v16 = (_OWORD *)((char *)v6 + v13 + 32);
goto LABEL_10;
}
}
v16 = v6;
LABEL_10:
v17 = v19;
*v16 = v18;
v16[1] = v17;
}
v7 = v10 + 2;
v9 += 32;
}
while ( v10 + 2 != a2 );
}
}
return result;
}