//
// PlatformerControlsPopup::commitCustomDraft from 0x79d028 to 0x79d0e8 (192 bytes)
//
// 2 xrefs:
// > PlatformerControlsPopup::onClose @ 0x79d0f2
// > PlatformerControlsPopup::onUpload @ 0x79e156
//
// 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:59:51 +0000
//
int __fastcall PlatformerControlsPopup::commitCustomDraft(int this, int a2, int a3)
{
int v3; // r4
int *v4; // r1
int v5; // r3
int v6; // r7
size_t v7; // r2
int v8; // r1
int v9; // r3
char *v10; // r0
unsigned __int8 *v11; // r1
char *v12; // r0
unsigned __int8 *v13; // r2
int v14; // t1
unsigned __int8 v15; // [sp+0h] [bp-14h] BYREF
char v16; // [sp+1h] [bp-13h] BYREF
size_t v17; // [sp+4h] [bp-10h]
char *v18; // [sp+8h] [bp-Ch]
v3 = this;
v4 = *(int **)(this + 736);
if ( v4 )
{
LevelControlConfig::encodeB64((LevelControlConfig *)&v15, v4, a3, _stack_chk_guard);
v5 = *(unsigned __int8 *)(v3 + 740);
v6 = v15 & 1;
if ( v6 )
v7 = v17;
else
v7 = (int)v15 >> 1;
v8 = v5 & 1;
if ( (v5 & 1) != 0 )
v9 = *(_DWORD *)(v3 + 744);
else
v9 = v5 >> 1;
if ( v7 != v9 )
goto LABEL_24;
if ( v6 )
v10 = v18;
else
v10 = &v16;
if ( v8 )
v11 = *(unsigned __int8 **)(v3 + 748);
else
v11 = (unsigned __int8 *)(v3 + 741);
if ( !v6 )
{
v12 = v10 - 1;
v13 = &v11[v7];
while ( v11 != v13 )
{
v14 = (unsigned __int8)*++v12;
if ( v14 != *v11 )
goto LABEL_24;
++v11;
}
return std::string::~string((int)&v15);
}
if ( v7 && memcmp(v10, v11, v7) )
{
LABEL_24:
std::string::operator=((unsigned __int8 *)(*(_DWORD *)(v3 + 728) + 1344), &v15);
*(_BYTE *)(*(_DWORD *)(v3 + 728) + 1360) = 1;
std::string::operator=((unsigned __int8 *)(v3 + 740), &v15);
}
return std::string::~string((int)&v15);
}
return this;
}