//
// sub_1004B414C from 0x1004b414c to 0x1004b4214 (200 bytes)
//
// 3 xrefs:
// > sub_1004AC1C0 @ 0x1004ac288
// > sub_1004AC1C0 @ 0x1004ac2cc
// > sub_1004B4214 @ 0x1004b4280
//
// 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_1004B414C(int a1, char *a2, int a3)
{
__int64 result; // x0
__int64 v7; // x23
int v8; // [xsp+4h] [xbp-3Ch] BYREF
unsigned int v9; // [xsp+8h] [xbp-38h]
int v10; // [xsp+Ch] [xbp-34h] BYREF
v10 = 0;
sub_1004B5828(&v10);
v9 = 0;
result = sub_1004F5FD8(a1, a2);
if ( (_DWORD)result == 45 )
{
while ( 1 )
{
v7 = v9;
sub_1004B586C(1);
sub_1004B5828(&v8);
if ( v8 - v10 >= dword_100853290 )
break;
a3 -= v7;
a2 += v7;
v9 = 0;
result = sub_1004F5FD8(a1, a2);
if ( (_DWORD)result != 45 )
return result;
}
return 43;
}
return result;
}