//
// sub_1004CBD38 from 0x1004cbd38 to 0x1004cbf30 (504 bytes)
//
// 1 xrefs:
// > sub_1004CBC6C @ 0x1004cbcec
//
// 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 11:06:26 +0000
//
__int64 __fastcall sub_1004CBD38(__int64 a1, int a2)
{
__int64 v4; // x20
char *v5; // x0
std::string *v6; // x0
std::string *v7; // x0
__int128 v8; // q0
char *v9; // x1
__int64 v10; // x0
float32x2_t v12; // [xsp+18h] [xbp-B8h] BYREF
float32x2_t v13; // [xsp+20h] [xbp-B0h] BYREF
std::string v14; // [xsp+28h] [xbp-A8h] BYREF
float32x2_t v15; // [xsp+40h] [xbp-90h] BYREF
void *v16[2]; // [xsp+48h] [xbp-88h] BYREF
char v17; // [xsp+5Fh] [xbp-71h]
void *__p[2]; // [xsp+60h] [xbp-70h] BYREF
char v19; // [xsp+77h] [xbp-59h]
void *v20[2]; // [xsp+78h] [xbp-58h] BYREF
char v21; // [xsp+8Fh] [xbp-41h]
__int128 v22; // [xsp+90h] [xbp-40h] BYREF
signed __int64 v23; // [xsp+A0h] [xbp-30h]
_WORD v24[2]; // [xsp+ACh] [xbp-24h] BYREF
v4 = SetupTriggerPopup::init(a1, 0, 0, 7, 320.0, 160.0, 0.0);
if ( (_DWORD)v4 )
{
*(_DWORD *)(a1 + 1012) = a2;
*(_BYTE *)(a1 + 596) = 1;
SetupTriggerPopup::preSetup((_BYTE *)a1);
qmemcpy(v24, "PWi", 3);
SetupTriggerPopup::setCustomBGColor(a1, (__int64)v24);
v5 = (char *)sub_1004C85E8(*(_DWORD *)(a1 + 1012));
v6 = (std::string *)sub_100009900(v20, v5);
v7 = std::string::append(v6, " - Settings");
v8 = *(_OWORD *)&v7->__r_.__value_.__l.__data_;
v23 = v7->__r_.__value_.__r.__words[2];
v22 = v8;
v7->__r_.__value_.__l.__size_ = 0;
v7->__r_.__value_.__r.__words[2] = 0;
v7->__r_.__value_.__r.__words[0] = 0;
if ( v21 < 0 )
operator delete(v20[0]);
if ( v23 >= 0 )
v9 = (char *)&v22;
else
v9 = (char *)v22;
sub_100009900(__p, v9);
sub_1001ACA6C(a1, (__int64 *)__p);
if ( v19 < 0 )
operator delete(__p[0]);
sub_100009900(v16, "OK");
sub_1001ACB3C(a1, (__int64)v16);
if ( v17 < 0 )
operator delete(v16[0]);
v10 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v10, v20);
sub_1000262BC((float *)&v15, *(float *)v20 * 0.5, *((float *)v20 + 1) * 0.5);
sub_100009900(&v14, "Min Interval");
sub_1000262BC((float *)&v12, 0.0, 20.0);
sub_100026318(&v15, &v12, &v13);
SetupTriggerPopup::createValueControlAdvanced(
a1,
9001,
&v14,
(double *)&v13,
0,
1,
5,
0,
0.8,
0.0,
1.0,
0,
0,
0,
2,
0);
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v14.__r_.__value_.__l.__data_);
SetupTriggerPopup::postSetup((_BYTE *)a1);
if ( SHIBYTE(v23) < 0 )
operator delete((void *)v22);
}
return v4;
}