//
// GameLevelManager::uploadDeathData from 0x4bcc98 to 0x4bd2ee (1622 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::onEnterTransitionDidFinish @ 0x49f284
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:19 +0000
//
int __fastcall GameLevelManager::uploadDeathData(GameLevelManager *this)
{
char *v1; // r10
int result; // r0
int v4; // r8
char *v5; // r11
_DWORD *v6; // r3
_DWORD *v7; // r7
int v8; // r4
_DWORD *v9; // r2
int v10; // r2
const void *v11; // r1
size_t v12; // r2
int *v13; // r0
int v14; // r1
int v15; // r2
int *v16; // r0
int v17; // r1
int v18; // r2
_BYTE *v19; // r1
size_t v20; // r2
_DWORD *v21; // r0
int v22; // r1
int v23; // r2
int v24; // r3
int *v25; // r0
int v26; // r1
char *v27; // r2
char *v28; // r1
size_t v29; // r2
int *v30; // r0
int v31; // r1
int v32; // r2
int *v33; // r0
int v34; // r1
int v35; // r2
_BYTE *v36; // r1
size_t v37; // r2
int *v38; // r0
int v39; // r1
int v40; // r2
char *v41; // r1
size_t v42; // r2
int v43; // r3
int *v44; // r0
int v45; // r1
char *v46; // r2
char *v47; // r1
size_t v48; // r2
int *v49; // r0
int v50; // r1
int v51; // r2
int *v52; // r0
int v53; // r1
int v54; // r2
char *v55; // r1
int *v56; // r0
int v57; // r1
int v58; // r2
char *v59; // r1
size_t v60; // r2
int v61; // r3
char *v62; // r1
size_t v63; // r2
cocos2d::CCString *v64; // r0
char *CString; // r0
size_t v66; // r0
size_t v67; // r0
int v68; // [sp+14h] [bp-D8h]
int v69; // [sp+3Ch] [bp-B0h] BYREF
size_t v70; // [sp+40h] [bp-ACh]
char *v71; // [sp+44h] [bp-A8h]
int v72; // [sp+48h] [bp-A4h] BYREF
int v73; // [sp+4Ch] [bp-A0h]
char *v74; // [sp+50h] [bp-9Ch]
_DWORD v75[3]; // [sp+54h] [bp-98h]
_DWORD v76[3]; // [sp+60h] [bp-8Ch] BYREF
unsigned int v77[3]; // [sp+6Ch] [bp-80h] BYREF
unsigned __int8 v78; // [sp+78h] [bp-74h] BYREF
_BYTE v79[3]; // [sp+79h] [bp-73h] BYREF
size_t v80; // [sp+7Ch] [bp-70h]
_BYTE *v81; // [sp+80h] [bp-6Ch]
_DWORD v82[3]; // [sp+84h] [bp-68h] BYREF
unsigned __int8 v83; // [sp+90h] [bp-5Ch] BYREF
char v84; // [sp+91h] [bp-5Bh] BYREF
size_t v85; // [sp+94h] [bp-58h]
char *v86; // [sp+98h] [bp-54h]
_DWORD v87[3]; // [sp+9Ch] [bp-50h] BYREF
unsigned __int8 v88; // [sp+A8h] [bp-44h] BYREF
char v89; // [sp+A9h] [bp-43h] BYREF
size_t v90; // [sp+ACh] [bp-40h]
char *v91; // [sp+B0h] [bp-3Ch]
int v92; // [sp+B4h] [bp-38h] BYREF
int v93; // [sp+B8h] [bp-34h]
char *v94; // [sp+BCh] [bp-30h]
int v95; // [sp+C0h] [bp-2Ch] BYREF
int v96; // [sp+C4h] [bp-28h]
int v97; // [sp+C8h] [bp-24h]
int v98; // [sp+CCh] [bp-20h] BYREF
int v99; // [sp+D0h] [bp-1Ch]
int v100; // [sp+D4h] [bp-18h]
int v101; // [sp+D8h] [bp-14h] BYREF
size_t v102; // [sp+DCh] [bp-10h]
char *v103; // [sp+E0h] [bp-Ch]
result = GJAccountManager::sharedState(this);
if ( *(_DWORD *)(result + 280) - *(_DWORD *)(result + 284) > 0 )
{
result = GameLevelManager::isDLActive(this, "UploadDeathData");
if ( !result )
{
result = time(nullptr);
v68 = result;
if ( !dword_D2BB38 || result - dword_D2BB38 >= 300 )
{
v69 = 0;
v70 = 0;
v71 = nullptr;
std::string::__init(&v69, &unk_B6B226, 0);
v72 = 0;
v73 = 0;
v74 = nullptr;
std::string::__init(&v72, &unk_B6B226, 0);
v4 = 0;
v5 = nullptr;
v75[0] = *((_DWORD *)this + 136);
v75[1] = *((_DWORD *)this + 147);
v75[2] = *((_DWORD *)this + 168);
do
{
v6 = (_DWORD *)v75[v4];
if ( v6 )
{
v6 = (_DWORD *)v6[13];
if ( v6 )
v7 = (_DWORD *)v6[68];
else
v7 = nullptr;
while ( v6 )
{
v8 = v6[65];
if ( v8
&& *(_BYTE *)(v8 + 1300)
&& (unsigned int)(*(_DWORD *)(v8 + 952) - 1) > 1
&& GameLevelManager::dtShouldUploadLevel(this, (GJGameLevel *)v8) )
{
std::operator+(v77, (unsigned __int8 *)(v8 + 1288), ";");
v10 = *(unsigned __int8 *)(v8 + 1192);
if ( (v10 & 1) != 0 )
{
v11 = *(const void **)(v8 + 1200);
v12 = *(_DWORD *)(v8 + 1196);
}
else
{
v11 = (const void *)(v8 + 1193);
v12 = v10 >> 1;
}
v13 = std::string::append(v77, v11, v12);
v14 = v13[1];
v15 = v13[2];
v98 = *v13;
v99 = v14;
v100 = v15;
*v13 = 0;
v13[1] = 0;
v13[2] = 0;
v16 = std::string::append(&v98, ";");
v17 = v16[1];
v18 = v16[2];
v101 = *v16;
v102 = v17;
v103 = (char *)v18;
*v16 = 0;
v16[1] = 0;
v16[2] = 0;
GameToolbox::intToString((GameToolbox *)&v78, *(_DWORD *)(v8 + 1256));
if ( (v78 & 1) != 0 )
{
v19 = v81;
v20 = v80;
}
else
{
v20 = (int)v78 >> 1;
v19 = v79;
}
v21 = std::string::append(&v101, v19, v20);
v22 = v21[1];
v23 = v21[2];
v76[0] = *v21;
v76[1] = v22;
v76[2] = v23;
*v21 = 0;
v21[1] = 0;
v21[2] = 0;
std::string::~string((int)&v78);
std::string::~string((int)&v101);
std::string::~string((int)&v98);
std::string::~string((int)v77);
cocos2d::ZipUtils::compressString(&v78, v76, 0, -1, 0);
if ( (v69 & 1) != 0 )
v24 = v70;
else
v24 = (int)(unsigned __int8)v69 >> 1;
if ( v24 )
std::string::append(&v69, ";");
GameToolbox::intToString((GameToolbox *)v82, *(_DWORD *)(v8 + 268) - *(_DWORD *)(v8 + 272));
v25 = std::string::append(v82, ",");
v26 = v25[1];
v27 = (char *)v25[2];
v92 = *v25;
v93 = v26;
v94 = v27;
*v25 = 0;
v25[1] = 0;
v25[2] = 0;
GameToolbox::intToString((GameToolbox *)&v83, *(_DWORD *)(v8 + 612));
if ( (v83 & 1) != 0 )
{
v28 = v86;
v29 = v85;
}
else
{
v29 = (int)v83 >> 1;
v28 = &v84;
}
v30 = std::string::append(&v92, v28, v29);
v31 = v30[1];
v32 = v30[2];
v95 = *v30;
v96 = v31;
v97 = v32;
*v30 = 0;
v30[1] = 0;
v30[2] = 0;
v33 = std::string::append(&v95, ",");
v34 = v33[1];
v35 = v33[2];
v98 = *v33;
v99 = v34;
v100 = v35;
*v33 = 0;
v33[1] = 0;
v33[2] = 0;
if ( (v78 & 1) != 0 )
{
v36 = v81;
v37 = v80;
}
else
{
v37 = (int)v78 >> 1;
v36 = v79;
}
v38 = std::string::append(&v98, v36, v37);
v39 = v38[1];
v40 = v38[2];
v101 = *v38;
v102 = v39;
v103 = (char *)v40;
*v38 = 0;
v38[1] = 0;
v38[2] = 0;
if ( (v101 & 1) != 0 )
{
v41 = v103;
v42 = v102;
}
else
{
v42 = (int)(unsigned __int8)v101 >> 1;
v41 = (char *)&v101 + 1;
}
std::string::append(&v69, v41, v42);
std::string::~string((int)&v101);
std::string::~string((int)&v98);
std::string::~string((int)&v95);
std::string::~string((int)&v83);
std::string::~string((int)&v92);
std::string::~string((int)v82);
if ( (v72 & 1) != 0 )
v43 = v73;
else
v43 = (int)(unsigned __int8)v72 >> 1;
if ( v43 )
std::string::append(&v72, ",");
GameToolbox::intToString((GameToolbox *)v87, *(_DWORD *)(v8 + 268) - *(_DWORD *)(v8 + 272));
v44 = std::string::append(v87, ":");
v45 = v44[1];
v46 = (char *)v44[2];
v92 = *v44;
v93 = v45;
v94 = v46;
*v44 = 0;
v44[1] = 0;
v44[2] = 0;
GameToolbox::intToString((GameToolbox *)&v88, *(_DWORD *)(v8 + 744) - *(_DWORD *)(v8 + 748));
if ( (v88 & 1) != 0 )
{
v47 = v91;
v48 = v90;
}
else
{
v48 = (int)v88 >> 1;
v47 = &v89;
}
v49 = std::string::append(&v92, v47, v48);
v50 = v49[1];
v51 = v49[2];
v95 = *v49;
v96 = v50;
v97 = v51;
*v49 = 0;
v49[1] = 0;
v49[2] = 0;
v52 = std::string::append(&v95, ":");
v1 = (char *)&v98;
v53 = v52[1];
v54 = v52[2];
v98 = *v52;
v99 = v53;
v100 = v54;
*v52 = 0;
v52[1] = 0;
v52[2] = 0;
if ( *(_BYTE *)(v8 + 477) )
v55 = (char *)a1i2r3e45s789g;
else
v55 = "0";
v56 = std::string::append(&v98, v55);
v57 = v56[1];
v58 = v56[2];
v101 = *v56;
v102 = v57;
v103 = (char *)v58;
*v56 = 0;
v56[1] = 0;
v56[2] = 0;
if ( (v101 & 1) != 0 )
{
v59 = v103;
v60 = v102;
}
else
{
v60 = (int)(unsigned __int8)v101 >> 1;
v59 = (char *)&v101 + 1;
}
std::string::append(&v72, v59, v60);
++v5;
std::string::~string((int)&v101);
std::string::~string((int)&v98);
std::string::~string((int)&v95);
std::string::~string((int)&v88);
std::string::~string((int)&v92);
std::string::~string((int)v87);
if ( (int)v5 > 29 )
{
std::string::~string((int)&v78);
std::string::~string((int)v76);
v6 = &dword_0 + 1;
break;
}
std::string::~string((int)&v78);
std::string::~string((int)v76);
}
if ( v7 )
v9 = (_DWORD *)v7[68];
else
v9 = nullptr;
v6 = v7;
v7 = v9;
}
}
++v4;
}
while ( v4 != 3 && !v6 );
if ( (v69 & 1) != 0 )
v61 = v70;
else
v61 = (int)(unsigned __int8)v69 >> 1;
if ( v61 )
{
dword_D2BB38 = v68;
GameLevelManager::addDLToActive(this, "UploadDeathData", v68, (int)&dword_D2BB24);
GameLevelManager::getBasePostString((GameLevelManager *)&v92);
std::string::append(&v92, "&data=");
if ( (v69 & 1) != 0 )
{
v62 = v71;
v63 = v70;
}
else
{
v63 = (int)(unsigned __int8)v69 >> 1;
v62 = (char *)&v69 + 1;
}
std::string::append(&v92, v62, v63);
std::string::append(&v92, "&secret=");
v64 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
CString = (char *)cocos2d::CCString::getCString(v64);
std::string::append(&v92, CString);
v95 = 0;
v96 = 0;
v97 = 0;
std::string::__init(&v95, "https://www.boomlings.com/database/uploadGJDeathData.php", 0x38u);
if ( (v92 & 1) == 0 )
v1 = (char *)&v92 + 1;
v98 = 0;
if ( (v92 & 1) != 0 )
v1 = v94;
v99 = 0;
v100 = 0;
v66 = strlen(v1);
std::string::__init(&v98, v1, v66);
if ( (v72 & 1) == 0 )
v5 = (char *)&v72 + 1;
v101 = 0;
if ( (v72 & 1) != 0 )
v5 = v74;
v102 = 0;
v103 = nullptr;
v67 = strlen(v5);
std::string::__init(&v101, v5, v67);
GameLevelManager::ProcessHttpRequest(this, &v95, (int)&v98, (int)&v101, 105);
std::string::~string((int)&v101);
std::string::~string((int)&v98);
std::string::~string((int)&v95);
std::string::~string((int)&v92);
}
std::string::~string((int)&v72);
return std::string::~string((int)&v69);
}
}
}
return result;
}