//
// sub_10057FA70 from 0x10057fa70 to 0x10057fb56 (230 bytes)
//
// 0 xrefs:
//
// 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:20 +0000
//
int __fastcall sub_10057FA70(__int64 a1, const char *a2)
{
size_t v2; // rax
size_t v3; // rbx
char *v4; // r15
size_t v5; // r12
__int64 v6; // rbx
unsigned int v7; // ecx
int result; // eax
__int64 v9; // rax
const char *CString; // rax
_QWORD __dst[2]; // [rsp+8h] [rbp-38h] BYREF
void *__p; // [rsp+18h] [rbp-28h]
v2 = strlen(a2);
if ( v2 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v3 = v2;
if ( v2 >= 0x17 )
{
v5 = 26;
if ( (v2 | 7) != 0x17 )
v5 = (v2 | 7) + 1;
v4 = (char *)operator new(v5);
__p = v4;
__dst[0] = v5 + 1;
__dst[1] = v3;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v2;
v4 = (char *)__dst + 1;
if ( v2 )
LABEL_8:
memcpy(v4, a2, v3);
v4[v3] = 0;
v6 = sub_10053FBE0((unsigned __int8 *)__dst, "_");
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
v7 = sub_1007FEF90(v6);
result = 0;
if ( v7 >= 5 )
{
v9 = sub_1007FEFE0(v6, 4);
CString = (const char *)cocos2d::CCString::getCString(v9);
return atoi(CString);
}
return result;
}