//
// sub_10070B880 from 0x10070b880 to 0x10070b970 (240 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009bf328
//
// 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:12:54 +0000
//
__int64 __fastcall sub_10070B880(__int64 a1, _BYTE *a2, unsigned __int64 *a3, unsigned __int64 a4)
{
unsigned __int64 v4; // x20
unsigned __int64 *v5; // x23
_BYTE *v6; // x19
_BYTE *v8; // x26
unsigned __int64 *v9; // x0
unsigned __int64 v11; // [xsp+8h] [xbp-68h]
unsigned __int64 v12; // [xsp+10h] [xbp-60h]
unsigned __int64 *v13; // [xsp+18h] [xbp-58h]
v4 = a4;
v5 = a3;
v6 = a2;
if ( a4 >> 62 )
{
v12 = a4 - 0x4000000000000000LL;
v11 = (a4 - 0x4000000000000000LL) & 0xC000000000000000LL;
v13 = (unsigned __int64 *)((char *)a3 + v11 + 0x4000000000000000LL);
v8 = a2;
do
{
sub_1006C42A8(
v5,
v8,
0x4000000000000000LL,
*(unsigned int **)(a1 + 120),
(unsigned __int8 *)(a1 + 40),
(int *)(a1 + 88));
v4 -= 0x4000000000000000LL;
v5 += 0x800000000000000LL;
v8 += 0x4000000000000000LL;
}
while ( v4 >> 62 );
v6 += v11 + 0x4000000000000000LL;
v4 = v12 - v11;
v9 = v13;
}
else
{
v9 = a3;
}
if ( v4 )
sub_1006C42A8(v9, v6, v4, *(unsigned int **)(a1 + 120), (unsigned __int8 *)(a1 + 40), (int *)(a1 + 88));
return 1;
}