//
// SetFolderPopup::onSetFolderName from 0x1403a6ba0 to 0x1403a6db7 (535 bytes)
//
// 3 xrefs:
// > SetFolderPopup::init @ 0x1403a695f
// > ??> @ 0x140923804
// > ??> @ 0x140923810
//
// This function is hookable on this platform (idp: pc, 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 11:31:19 +0000
//
// Hidden C++ exception states: #wind=6
void __fastcall SetFolderPopup::onSetFolderName(__int64 a1)
{
__int64 v2; // rcx
_QWORD *FolderName; // rax
size_t v4; // r8
_QWORD *v5; // rbx
char v6[16]; // [rsp+50h] [rbp-B0h] BYREF
__int64 v7; // [rsp+60h] [rbp-A0h]
__int64 v8; // [rsp+68h] [rbp-98h]
_DWORD v9[4]; // [rsp+70h] [rbp-90h] BYREF
__int64 v10; // [rsp+80h] [rbp-80h]
__int64 v11; // [rsp+88h] [rbp-78h]
void *v12; // [rsp+90h] [rbp-70h]
__int128 v13; // [rsp+98h] [rbp-68h] BYREF
__int64 v14; // [rsp+A8h] [rbp-58h]
__int64 v15; // [rsp+B0h] [rbp-50h]
__int128 v16; // [rsp+B8h] [rbp-48h] BYREF
__int64 v17; // [rsp+C8h] [rbp-38h]
__int64 v18; // [rsp+D0h] [rbp-30h]
__int128 *v19; // [rsp+D8h] [rbp-28h]
char *v20; // [rsp+E0h] [rbp-20h]
_DWORD *v21; // [rsp+E8h] [rbp-18h]
_QWORD v22[4]; // [rsp+F0h] [rbp-10h] BYREF
if ( *(int *)(a1 + 672) > 0 )
{
v19 = &v13;
v20 = v6;
v21 = v9;
v13 = 0;
v14 = 2;
v15 = 15;
strcpy((char *)&v13, "OK");
v7 = 15;
v8 = 15;
strcpy(v6, "Set Folder Name");
v9[3] = 0;
v10 = 11;
v11 = 15;
strcpy((char *)v9, "Folder Name");
v2 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v12 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v12);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v2 = *(_QWORD *)&qword_14090BFB0;
}
FolderName = GameLevelManager::getFolderName(v2, v22, *(_DWORD *)(a1 + 672), *(_BYTE *)(a1 + 712));
if ( FolderName[3] > 0xFu )
FolderName = (_QWORD *)*FolderName;
v16 = 0;
v17 = 0;
v18 = 0;
v4 = -1;
do
++v4;
while ( *((_BYTE *)FolderName + v4) );
sub_14003D230(&v16, FolderName, v4);
v5 = (_QWORD *)SetTextPopup::create(
(unsigned int)&v16,
(unsigned int)v9,
20,
(unsigned int)v6,
(__int64)&v13,
1,
1114636288,
0,
1,
0);
sub_14003D310((__int64)v22);
v5[94] = a1 + 704;
(*(void (__fastcall **)(_QWORD *))(*v5 + 1064LL))(v5);
}
}