//
// sub_14010F0F0 from 0x14010f0f0 to 0x14010f1fe (270 bytes)
//
// 3 xrefs:
// > DeathTrackerPopup::parseGlobal @ 0x140106441
// > DeathTrackerPopup::countsForScope @ 0x140106747
// > ??> @ 0x140915c20
//
// This function is hookable on this platform (idp: pc, 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:26:48 +0000
//
__int64 __fastcall sub_14010F0F0(__int64 a1, __int64 a2, _DWORD *a3)
{
char *v5; // rcx
__int64 v6; // rbx
char *v7; // rdi
__int64 result; // rax
unsigned __int64 v9; // rdi
size_t v10; // rbx
_DWORD *v11; // rdi
size_t v12; // rbx
char *v13; // rbx
v5 = *(char **)a1;
if ( (unsigned __int64)((__int64)(*(_QWORD *)(a1 + 16) - (_QWORD)v5) >> 2) >= 0x65 )
{
v9 = (__int64)(*(_QWORD *)(a1 + 8) - (_QWORD)v5) >> 2;
if ( v9 >= 0x65 )
{
v13 = v5 + 404;
result = sub_14010FB50(v5);
*(_QWORD *)(a1 + 8) = v13;
}
else
{
result = sub_14010FB50(v5);
v10 = 101 - v9;
v11 = *(_DWORD **)(a1 + 8);
if ( *a3 )
{
for ( ; v10; --v10 )
{
result = (unsigned int)*a3;
*v11++ = result;
}
*(_QWORD *)(a1 + 8) = v11;
}
else
{
v12 = v10;
result = (__int64)memset(*(void **)(a1 + 8), 0, v12 * 4);
*(_QWORD *)(a1 + 8) = &v11[v12];
}
}
}
else
{
v6 = 101;
sub_14009A0D0(a1, 0x65u);
v7 = *(char **)a1;
if ( *a3 )
{
do
{
result = (unsigned int)*a3;
*(_DWORD *)v7 = result;
v7 += 4;
--v6;
}
while ( v6 );
*(_QWORD *)(a1 + 8) = v7;
}
else
{
result = (__int64)memset(*(void **)a1, 0, 0x194u);
*(_QWORD *)(a1 + 8) = v7 + 404;
}
}
return result;
}