//
// sub_10056BC50 from 0x10056bc50 to 0x10056bdab (347 bytes)
//
// 2 xrefs:
// > sub_10057AC30 @ 0x10057ad96
// > sub_10057ADF0 @ 0x10057afb5
//
// 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:32:13 +0000
//
void __fastcall sub_10056BC50(__int64 a1)
{
__int64 v1; // rbx
__int64 v2; // rax
unsigned int *v3; // rax
_QWORD *v4; // r13
_QWORD *v5; // r14
const char *CString; // r12
size_t v7; // rax
size_t v8; // r15
char *v9; // r14
__int64 v10; // rax
size_t v11; // rbx
__int64 v12; // [rsp+8h] [rbp-58h]
_QWORD *v13; // [rsp+10h] [rbp-50h]
_QWORD __dst[2]; // [rsp+20h] [rbp-40h] BYREF
void *__p; // [rsp+30h] [rbp-30h]
v1 = a1;
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 1040));
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
if ( *v3 )
{
v4 = *((_QWORD **)v3 + 2);
v5 = &v4[*v3 - 1];
v13 = v5;
while ( 1 )
{
if ( !*v4 )
return;
CString = (const char *)cocos2d::CCString::getCString(*v4);
if ( !strncmp(CString, "fReqI", 5u) )
break;
LABEL_4:
if ( ++v4 > v5 )
return;
}
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
v12 = *(_QWORD *)(v1 + 1040);
if ( v7 >= 0x17 )
{
v10 = v7 | 7;
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = v10 + 1;
v9 = (char *)operator new(v11);
__p = v9;
__dst[0] = v11 + 1;
__dst[1] = v8;
v1 = a1;
}
else
{
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( !v7 )
{
LABEL_15:
v9[v8] = 0;
cocos2d::CCDictionary::removeObjectForKey(v12, (char *)__dst);
v5 = v13;
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
goto LABEL_4;
}
}
memmove(v9, CString, v8);
goto LABEL_15;
}
}
}