//
// CreatorSettingsPopup::setTextPopupClosed from 0x766164 to 0x766298 (308 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'CreatorSettingsPopup::setTextPopupClosed @ 0x7662a4
//
// 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:07 +0000
//
GameLevelManager *__fastcall CreatorSettingsPopup::setTextPopupClosed(GameLevelManager *result, int a2, int a3)
{
GameLevelManager *v3; // r5
int v5; // r9
char *v6; // r1
size_t v7; // r2
GameLevelManager *v8; // r0
int v9; // r0
const char *v10; // r7
GameLevelManager *v11; // r8
int updated; // r7
int v13; // r2
int v14; // r2
int v15; // r3
int v16[3]; // [sp+4h] [bp-20h] BYREF
int v17; // [sp+10h] [bp-14h] BYREF
size_t v18; // [sp+14h] [bp-10h]
int v19; // [sp+18h] [bp-Ch]
v3 = result;
if ( !a2 || !*(_BYTE *)(a2 + 529) )
{
v5 = *((_DWORD *)result + 181);
std::string::basic_string(v16, a3);
LevelTools::base64EncodeString(&v17, v16);
if ( (int *)(v5 + 292) != &v17 )
{
if ( (v17 & 1) != 0 )
{
v6 = (char *)v19;
v7 = v18;
}
else
{
v7 = (int)(unsigned __int8)v17 >> 1;
v6 = (char *)&v17 + 1;
}
std::string::assign((_DWORD *)(v5 + 292), v6, v7);
}
std::string::~string((int)&v17);
std::string::~string((int)v16);
result = *((GameLevelManager **)v3 + 182);
if ( result )
result = (GameLevelManager *)(*(int (__fastcall **)(GameLevelManager *, int))(*(_DWORD *)result + 8))(result, a3);
if ( *(_DWORD *)(*((_DWORD *)v3 + 181) + 268) - *(_DWORD *)(*((_DWORD *)v3 + 181) + 272) > 0 )
{
v8 = (GameLevelManager *)GameLevelManager::sharedState(result);
*((_DWORD *)v8 + 222) = (char *)v3 + 712;
v9 = GameLevelManager::sharedState(v8);
v10 = (const char *)(*(_DWORD *)(*((_DWORD *)v3 + 181) + 268) - *(_DWORD *)(*((_DWORD *)v3 + 181) + 272));
v11 = (GameLevelManager *)v9;
std::string::basic_string(&v17, *((_DWORD *)v3 + 181) + 292);
updated = GameLevelManager::updateDescription(v11, v10, (int)&v17);
result = (GameLevelManager *)std::string::~string((int)&v17);
if ( updated )
{
v13 = *((_DWORD *)v3 + 183);
if ( v13 )
{
*(_DWORD *)(v13 + 520) = 0;
*((_DWORD *)v3 + 183) = 0;
}
v17 = 0;
v18 = 0;
v19 = 0;
std::string::__init(&v17, "Updating description...", 0x17u);
*((_DWORD *)v3 + 183) = UploadActionPopup::create((int)v3 + 716, (int)&v17, v14, v15);
std::string::~string((int)&v17);
return (GameLevelManager *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v3 + 183) + 656))(*((_DWORD *)v3 + 183));
}
}
}
return result;
}