//
// sub_100746E30 from 0x100746e30 to 0x100746ec4 (148 bytes)
//
// 2 xrefs:
// > sub_1007FEF20 @ 0x1007fef5f
// > sub_1007FEF70 @ 0x1007fef7d
//
// 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 12:36:31 +0000
//
void *__fastcall sub_100746E30(unsigned int *a1, unsigned int *a2)
{
int v3; // r15d
unsigned int v4; // esi
void *result; // rax
__int64 v6; // rsi
unsigned __int64 v7; // r12
__int64 v8; // r15
__int64 v9; // rcx
v3 = *a2;
v4 = a1[1];
result = (void *)(v3 + *a1);
if ( v4 < (unsigned int)result )
{
result = *((void **)a1 + 2);
do
{
v6 = 2 * v4;
a1[1] = v6;
result = realloc(result, 8 * v6);
*((_QWORD *)a1 + 2) = result;
v4 = a1[1];
}
while ( v4 < v3 + *a1 );
v3 = *a2;
}
if ( v3 )
{
v7 = 0;
do
{
v8 = *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * v7);
cocos2d::CCObject::retain(v8);
v9 = *a1;
*(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v9) = v8;
*a1 = v9 + 1;
++v7;
result = (void *)*a2;
}
while ( v7 < (unsigned __int64)result );
}
return result;
}