//
// GameLevelManager::submitUserInfo from 0x3d4b68 to 0x3d4d6a (514 bytes)
//
// 1 xrefs:
// > GameLevelManager::onUpdateUserScoreCompleted @ 0x3d4e22
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GameLevelManager::submitUserInfo(GameLevelManager *a1)
{
GameLevelManager *v1; // r0
cocos2d::CCArray *CompletedLevels; // r7
unsigned int i; // r6
_DWORD *v4; // r5
cocos2d::CCString *v5; // r0
char *CString; // r0
const char *v7; // r6
GJAccountManager *v8; // r0
int v9; // r5
cocos2d::CCString *v10; // r0
const char *v11; // r0
cocos2d::CCString *v12; // r0
char *v13; // r0
char *v14; // r11
size_t v16; // [sp+1Ch] [bp-40h]
char *v17; // [sp+38h] [bp-24h] BYREF
char *v18; // [sp+3Ch] [bp-20h] BYREF
const char *v19; // [sp+40h] [bp-1Ch] BYREF
char *v20; // [sp+44h] [bp-18h] BYREF
char *v21; // [sp+48h] [bp-14h] BYREF
const char *v22; // [sp+4Ch] [bp-10h] BYREF
char *v23; // [sp+50h] [bp-Ch] BYREF
sub_776584((int)&v17, (char *)&unk_939830);
v1 = GameLevelManager::sharedState();
CompletedLevels = GameLevelManager::getCompletedLevels(v1, 0);
for ( i = 0; i < cocos2d::CCArray::count(CompletedLevels); ++i )
{
v4 = (_DWORD *)cocos2d::CCArray::objectAtIndex(CompletedLevels, i);
if ( i )
sub_774544((int)&v17, ";");
sub_775C20(&v18);
v16 = strlen(v18);
sub_774008(&v18);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s,%i,%s,%i,%s,%i,%s,%i",
(const char *)&aO1i2r3e45s7t89[1],
v4[67] - v4[68],
&aO1i2r3e45s7t89[3],
v4[109] - v4[110],
&aO1i2r3e45s7t89[5],
v4[112] - v4[113],
&aO1i2r3e45s7t89[7],
v16);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_774544((int)&v17, CString);
}
GameManager::sharedState();
sub_775C20(&v19);
v7 = v19;
v8 = GJAccountManager::sharedState();
v9 = v8->m_accountID - v8->m_unkInt1;
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
v11 = cocos2d::CCString::getCString(v10);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"udid=%s&accountID=%i&secret=%s",
v7,
v9,
v11);
v13 = (char *)cocos2d::CCString::getCString(v12);
sub_776584((int)&v20, v13);
sub_774544((int)&v20, "&levelsInfo=");
sub_774544((int)&v20, v17);
v14 = v20;
sub_776584((int)&v21, "https://www.boomlings.com/database/submitGJUserInfo.php");
sub_776584((int)&v22, v14);
sub_776584((int)&v23, (char *)&unk_939830);
GameLevelManager::ProcessHttpRequest(a1, &v21, &v22, &v23, 17);
sub_774008(&v23);
sub_774008(&v22);
sub_774008(&v21);
sub_774008(&v20);
sub_774008(&v19);
sub_774008(&v17);
}