//
// LevelControlConfig::createFromB64 from 0xcf657c to 0xcf6684 (264 bytes)
//
// 8 xrefs:
// > UILayer::resolveLevelControls @ 0x6f0224
// > GJGameLevel::shippedControls @ 0x809804
// > LevelBindingsLayer::onPaste @ 0xcf1c74
// > PlatformerControlsPopup::ensureCustomDraft @ 0xcfa350
// > PlatformerControlsPopup::init @ 0xcfae30
// > PlatformerControlsPopup::onApplyCreator @ 0xcfc540
// > TouchControlEditLayer::onPaste @ 0xd07ffc
// > ??> @ 0xc22a8
//
// 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 13:06:48 +0000
//
__int64 __fastcall LevelControlConfig::createFromB64(char *a1)
{
__int64 v2; // x21
char v3; // w0
__int64 v4; // x0
__int64 v5; // x1
__int64 v7; // [xsp+38h] [xbp+38h] BYREF
__int64 v8; // [xsp+40h] [xbp+40h]
void *v9; // [xsp+48h] [xbp+48h]
void *v10[3]; // [xsp+50h] [xbp+50h] BYREF
v2 = LevelControlConfig::create(_stack_chk_guard);
v3 = *a1;
v7 = 0;
v8 = 0;
v9 = nullptr;
if ( (v3 & 1) != 0 )
{
std::string::__init(&v7, *((void **)a1 + 2), *((_QWORD *)a1 + 1));
}
else
{
v4 = *(_QWORD *)a1;
v5 = *((_QWORD *)a1 + 1);
v9 = *((void **)a1 + 2);
v7 = v4;
v8 = v5;
}
LevelTools::base64DecodeString((__int64)&v7, v10);
LevelControlConfig::decode(v2, (unsigned __int8 *)v10);
if ( ((__int64)v10[0] & 1) != 0 )
operator delete(v10[2]);
if ( (v7 & 1) != 0 )
operator delete(v9);
return v2;
}