//
// GameLevelManager::levelIDFromPostCommentKey from 0x80ecec to 0x80ee30 (324 bytes)
//
// 2 xrefs:
// > GameLevelManager::onUploadCommentCompleted @ 0x833160
// > ??> @ 0x875c8
//
// This function is hookable on this platform (idp: arm, 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:54:49 +0000
//
__int64 __fastcall GameLevelManager::levelIDFromPostCommentKey(GameLevelManager *this, const char *a2)
{
size_t v2; // x0
size_t v3; // x19
const char *v4; // x1
unsigned __int64 v5; // x0
__int64 v6; // x22
char *v7; // x0
char *v8; // x3
cocos2d::CCArray *v9; // x19
cocos2d::CCString *v10; // x0
const char *CString; // x0
__int64 v14; // [xsp+40h] [xbp+40h] BYREF
size_t v15; // [xsp+48h] [xbp+48h]
void *v16; // [xsp+50h] [xbp+50h]
v14 = 0;
v15 = 0;
v16 = nullptr;
v2 = strlen(a2);
v3 = v2;
v4 = a2;
if ( v2 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v2 > 0x16 )
{
v5 = (v2 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v6 = v5 | 1;
v7 = (char *)operator new(v5);
v14 = v6;
v4 = a2;
v8 = v7;
v16 = v7;
v15 = v3;
LABEL_4:
v8 = (char *)memcpy(v8, v4, v3);
goto LABEL_5;
}
LOBYTE(v14) = 2 * v2;
v8 = (char *)&v14 + 1;
if ( v2 )
goto LABEL_4;
LABEL_5:
v8[v3] = 0;
v9 = sub_80CFCC((unsigned __int8 *)&v14, &byte_11528B0);
if ( (v14 & 1) != 0 )
operator delete(v16);
if ( (unsigned int)cocos2d::CCArray::count(v9) <= 1 )
return 0;
v10 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 1u);
CString = (const char *)cocos2d::CCString::getCString(v10);
return atoi(CString);
}