//
// GJGameLevel::ensureSessionLog from 0x4ca74c to 0x4ca7e2 (150 bytes)
//
// 2 xrefs:
// > GJGameLevel::rollSession @ 0x4d730e
// > DeathTrackerPopup::parseSessions @ 0x77585e
//
// 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:37 +0000
//
int __fastcall GJGameLevel::ensureSessionLog(int this, int a2, int a3, int a4)
{
int v4; // r5
int v5; // r4
int v6; // r4
int v7; // r4
int *v9; // r7
int v10; // r0
int v11; // r1
int v12; // r2
int v13; // [sp+0h] [bp-10h] BYREF
int v14; // [sp+4h] [bp-Ch]
int v15; // [sp+8h] [bp-8h]
int v16; // [sp+Ch] [bp-4h]
v13 = this;
v14 = a2;
v15 = a3;
v16 = a4;
v4 = this;
v5 = *(unsigned __int8 *)(this + 1272);
if ( (v5 & 1) != 0 )
v6 = *(_DWORD *)(this + 1276);
else
v6 = v5 >> 1;
if ( v6 )
{
v7 = *(unsigned __int8 *)(this + 1260);
if ( !((v7 & 1) != 0 ? *(_DWORD *)(this + 1264) : v7 >> 1) )
{
v9 = (int *)(this + 1260);
cocos2d::ZipUtils::decompressString(&v13, this + 1272, 0, 0);
if ( (*(_BYTE *)(v4 + 1260) & 1) != 0 )
{
**(_BYTE **)(v4 + 1268) = 0;
*(_DWORD *)(v4 + 1264) = 0;
}
else
{
*(_BYTE *)(v4 + 1261) = 0;
*(_BYTE *)(v4 + 1260) = 0;
}
std::string::reserve(v9, 0);
v10 = v13;
v11 = v14;
v12 = v15;
v13 = 0;
v14 = 0;
v15 = 0;
*v9 = v10;
v9[1] = v11;
v9[2] = v12;
return std::string::~string((int)&v13);
}
}
return this;
}