//
// sub_6B8B0 from 0x6b8b0 to 0x6b936 (134 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall sub_6B8B0(_DWORD *a1, int a2, unsigned int a3, _DWORD *a4)
{
int v5; // r0
int v7; // r0
int (__fastcall ***v10)(_DWORD); // r0
int (__fastcall ***v11)(_DWORD); // r10
int v12; // r6
int v13; // r4
int v14; // r3
int result; // r0
_DWORD *v16; // [sp+Ch] [bp-24h]
int v17; // [sp+10h] [bp-20h] BYREF
*a4 = 0;
v5 = a1[92];
if ( !v5 )
return 28;
v7 = *(_DWORD *)(v5 + 71940);
if ( !v7 )
return 13;
v10 = sub_526EC(v7, 10);
if ( !v10 )
return 13;
v16 = a4;
v11 = v10;
v12 = 0;
v13 = 13;
while ( a3 )
{
v13 = 0;
v17 = 0;
v14 = a3;
if ( a3 >= 0x10000 )
v14 = 0x10000;
result = sub_6C2E0(v11, a1[106], a2 + v12, v14, a1[105], &v17);
v12 += v17;
a3 -= v17;
a1[105] += v17;
if ( result )
goto LABEL_13;
}
result = v13;
LABEL_13:
*v16 = v12;
return result;
}