//
// sub_10029CB30 from 0x10029cb30 to 0x10029cbf1 (193 bytes)
//
// 1 xrefs:
// > sub_100870A20 @ 0x100870ad1
//
// 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:27:53 +0000
//
__int64 __fastcall sub_10029CB30(__int64 a1, int a2)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // r14
__int64 v6; // rax
__int64 CString; // rax
unsigned __int64 v8; // r14
char v9; // [rsp+0h] [rbp-10h]
*(_BYTE *)(a1 + 376) = a2;
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 368) + 344LL))(*(_QWORD *)(a1 + 368));
if ( !a2 )
{
v4 = *(_QWORD *)(a1 + 360);
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, 0);
v5 = *(_QWORD *)(a1 + 360);
v6 = sub_10088E820("(%i)", v9);
CString = cocos2d::CCString::getCString(v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 928LL))(v5, CString);
}
result = *(_QWORD *)(a1 + 384);
if ( *(_QWORD *)(a1 + 392) != result )
{
v8 = 0;
do
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(result + 8 * v8) + 344LL))(
*(_QWORD *)(result + 8 * v8),
0);
++v8;
result = *(_QWORD *)(a1 + 384);
}
while ( v8 < (*(_QWORD *)(a1 + 392) - result) >> 3 );
}
}
return result;
}