//
// ConfigureValuePopup::init from 0x140131b40 to 0x140132589 (2633 bytes)
//
// 2 xrefs:
// > ConfigureValuePopup::create @ 0x140131ac8
// > ??> @ 0x140916f34
//
// 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:27:03 +0000
//
// Hidden C++ exception states: #wind=4
char __fastcall ConfigureValuePopup::init(
__int64 a1,
__int64 a2,
float a3,
float a4,
int a5,
void **a6,
__int64 a7,
int a8)
{
__int64 v10; // rcx
__int64 v12; // rax
__int64 v13; // rax
__int64 *v14; // rdi
__int64 v15; // rbx
__int64 v16; // rax
__int64 v17; // rbx
float v18; // xmm6_4
__int64 v19; // rax
const char *v20; // rcx
struct cocos2d::CCLabelBMFont *v21; // rdi
__int64 v22; // rbx
__int64 v23; // rax
__int64 v24; // rax
int v25; // eax
cocos2d::CCObject *v26; // rax
__int64 *v27; // rdi
__int64 v28; // rbx
__int64 v29; // rax
__int64 v30; // rbx
const char *v31; // rdx
cocos2d::CCString *v32; // rax
const char *CString; // rax
size_t v34; // r8
__int64 *v35; // rsi
__int64 v36; // rdi
__int64 v37; // rbx
__int64 v38; // rax
__int64 v39; // rax
__int64 v40; // rax
_QWORD *v41; // rsi
__int64 v42; // rdx
__int64 v43; // rdx
__int64 v44; // rcx
const char *v45; // r8
char *v46; // rax
__int64 *v47; // rdi
__int64 v48; // rbx
__int64 v49; // rax
__int64 v50; // rcx
__int64 v51; // rcx
__int64 v52; // rcx
__int64 v53; // xmm0_8
__int64 v54; // rcx
__int64 v55; // rcx
__int64 v56; // r8
cocos2d::CCLayer *v57; // rax
__int64 v58; // rax
float v59; // xmm2_4
void **v60; // rcx
struct cocos2d::CCSprite *v61; // rax
int v62; // ebx
cocos2d::CCObject *v63; // rdi
__int64 v64; // rax
__int64 v65; // rbx
__int64 v66; // rax
void **v67; // rcx
cocos2d::CCSprite *v68; // rbx
cocos2d::CCObject *v69; // rdi
__int64 v70; // rax
__int64 v71; // rbx
__int64 v72; // rax
void *v73; // rcx
_BYTE *v74; // [rsp+48h] [rbp-C0h] BYREF
float v75; // [rsp+50h] [rbp-B8h] BYREF
float v76; // [rsp+54h] [rbp-B4h]
_BYTE v77[8]; // [rsp+58h] [rbp-B0h] BYREF
_BYTE v78[8]; // [rsp+60h] [rbp-A8h] BYREF
_BYTE v79[8]; // [rsp+68h] [rbp-A0h] BYREF
_BYTE v80[8]; // [rsp+70h] [rbp-98h] BYREF
_BYTE v81[32]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v82[16]; // [rsp+98h] [rbp-70h] BYREF
void **v83; // [rsp+A8h] [rbp-60h]
__int64 v84; // [rsp+B0h] [rbp-58h]
void *Block[2]; // [rsp+B8h] [rbp-50h] BYREF
__m128i si128; // [rsp+C8h] [rbp-40h]
v83 = a6;
v84 = a7;
if ( FLAlertLayer::init_1(a1, 200) )
{
*(_DWORD *)(a1 + 664) = a8;
*(float *)(a1 + 668) = a3;
*(float *)(a1 + 672) = a4;
*(_DWORD *)(a1 + 676) = a5;
*(_QWORD *)(a1 + 688) = a2;
*(_BYTE *)(a1 + 596) = 1;
v12 = cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v12, &v75);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, 0.0, 0.0, 80.0, 80.0);
v14 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v13);
v15 = *v14;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v74, 260.0, 200.0);
(*(void (__fastcall **)(__int64 *, __int64))(v15 + 312))(v14, v16);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v14,
0xFFFFFFFFLL);
v17 = *v14;
v18 = 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, v75 * 0.5, v76 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v17 + 184))(v14, v19);
if ( !a6[2] )
sub_1400405A0(a6, "No Title", 8u);
v20 = (const char *)a6;
if ( (unsigned __int64)a6[3] > 0xF )
v20 = (const char *)*a6;
v21 = cocos2d::CCLabelBMFont::create(v20, "goldFont.fnt");
v22 = *(_QWORD *)v21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, v75 * 0.5, (float)((float)(v76 * 0.5) + 100.0) - 23.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v22 + 184))(v21, v23);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v21);
v24 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v24;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v24);
v25 = (unsigned int)ButtonSprite::create_1(
(int)"OK",
90,
0,
1.0,
0,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v26 = CCMenuItemSpriteExtra::create(v25, 0, a1, (__int64)ConfigureValuePopup::onClose);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v26);
v27 = *(__int64 **)(a1 + 552);
v28 = *v27;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, v75 * 0.5, (float)((float)(v76 * 0.5) - 100.0) + 25.0);
(*(void (__fastcall **)(__int64 *, __int64))(v28 + 184))(v27, v29);
if ( *(_QWORD *)(a7 + 16) )
{
v74 = v81;
v30 = sub_14003F4F0((__int64)v81, a7);
v31 = (const char *)a6;
if ( (unsigned __int64)a6[3] > 0xF )
v31 = (const char *)*a6;
v32 = cocos2d::CCString::createWithFormat("%s Help", v31);
CString = cocos2d::CCString::getCString(v32);
*(_OWORD *)Block = 0;
si128 = 0u;
v34 = -1;
do
++v34;
while ( CString[v34] );
sub_14003D230(Block, CString, v34);
v35 = (__int64 *)InfoAlertButton::create(Block, v30);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v35);
v36 = *v35;
v37 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v74,
(float)((float)(v75 * 0.5) + 130.0) - 18.0,
(float)((float)(v76 * 0.5) + 100.0) - 18.0);
cocos2d::CCNode::convertToNodeSpace(v37, v77, v38);
(*(void (__fastcall **)(__int64 *, __int64))(v36 + 184))(v35, v39);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, v75 * 0.5, (float)(v76 * 0.5) + 20.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v82, 0.0, 0.0, 40.0, 40.0);
v40 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, (const struct cocos2d::CCRect *)v82);
v41 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v40);
LOBYTE(v42) = 100;
(*(void (__fastcall **)(_QWORD *, __int64))(v41[40] + 40LL))(v41 + 40, v42);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v79, 70.0, 30.0);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v41 + 312LL))(v41, v79);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v41,
0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v41 + 184LL))(v41, v78);
v45 = "Num";
if ( *(float *)(a1 + 668) == -9999.0 )
v45 = "Mixed";
v46 = CCTextInputNode::create(v44, v43, (__int64)v45);
*(_QWORD *)(a1 + 696) = v46;
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v46, 20);
v47 = *(__int64 **)(a1 + 696);
v48 = *v47;
v49 = (*(__int64 (__fastcall **)(_QWORD *))(*v41 + 200LL))(v41);
(*(void (__fastcall **)(__int64 *, __int64))(v48 + 184))(v47, v49);
v50 = *(_QWORD *)(a1 + 696);
*(_DWORD *)(v50 + 564) = 1058642330;
CCTextInputNode::refreshLabel(v50);
v51 = *(_QWORD *)(a1 + 696);
*(_DWORD *)(v51 + 560) = 1128792064;
CCTextInputNode::refreshLabel(v51);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 696) + 592LL) + 336LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 696) + 592LL),
0);
*(_DWORD *)(*(_QWORD *)(a1 + 696) + 608LL) = 5;
si128.m128i_i64[1] = 15;
v52 = *(_QWORD *)(a1 + 696);
if ( *(_DWORD *)(a1 + 664) == 1 )
{
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 10;
v53 = *(_QWORD *)"0123456789";
strcpy((char *)&Block[1], "89");
}
else
{
si128.m128i_i64[0] = 11;
v53 = 0x3736353433323130LL;
Block[1] = (void *)3029304;
}
Block[0] = (void *)v53;
CCTextInputNode::setAllowedChars(v52, Block);
v54 = *(_QWORD *)(a1 + 696);
*(_WORD *)(v54 + 572) = -21896;
*(_BYTE *)(v54 + 574) = -16;
CCTextInputNode::refreshLabel(v54);
v55 = *(_QWORD *)(a1 + 696);
*(_DWORD *)(v55 + 568) = 1056964608;
CCTextInputNode::refreshLabel(v55);
*(_BYTE *)(*(_QWORD *)(a1 + 696) + 424LL) = 1;
*(_QWORD *)(*(_QWORD *)(a1 + 696) + 600LL) = a1 + 544;
if ( *(_DWORD *)(a1 + 664) )
{
*(_OWORD *)Block = 0;
si128 = 0;
Block[0] = sub_14003D460(0x20u);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836640);
strcpy((char *)Block[0], "GJ_arrow_01_001.png");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, (const struct cocos2d::CCPoint *)v78);
v60 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v60 = (void **)Block[0];
v61 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v60);
v62 = (int)v61;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v61 + 160LL))(v61);
v63 = CCMenuItemSpriteExtra::create(v62, 0, a1, (__int64)ConfigureValuePopup::onArrow);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v63);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v80, -65.0, 0.0);
cocos2d::CCPoint::operator+(v77, &v74, v64);
v65 = *(_QWORD *)v63;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v81, &v74);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v65 + 184))(v63, v66);
*((_DWORD *)v63 + 93) = 1068708659;
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v63 + 64LL))(v63, 0);
v67 = Block;
if ( si128.m128i_i64[1] > 0xFuLL )
v67 = (void **)Block[0];
v68 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v67);
cocos2d::CCSprite::setFlipX(v68, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v68 + 160LL))(v68);
v69 = CCMenuItemSpriteExtra::create((int)v68, 0, a1, (__int64)ConfigureValuePopup::onArrow);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, 65.0, 0.0);
cocos2d::CCPoint::operator+(v77, &v74, v70);
v71 = *(_QWORD *)v69;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v80, &v74);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v71 + 184))(v69, v72);
*((_DWORD *)v69 + 93) = 1068708659;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v69 + 64LL))(v69, 1);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v73 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v73 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v73 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v73);
}
}
else
{
v57 = Slider::create(
a1,
(__int64)ConfigureValuePopup::sliderChanged,
v56,
"slidergroove.png",
(__int64)"sliderthumb.png",
(__int64)"sliderthumbsel.png",
0.80000001);
*(_QWORD *)(a1 + 704) = v57;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v57 + 52) + 336LL))(*((_QWORD *)v57 + 52), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 704));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, 0.0, -40.0);
cocos2d::CCPoint::operator+(v78, v77, v58);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 704) + 184LL))(*(_QWORD *)(a1 + 704), v77);
v59 = *(float *)(a1 + 668);
if ( v59 != -9999.0 )
v18 = fmaxf(
0.0,
fminf(1.0, (float)(v59 - *(float *)(a1 + 672)) / (float)(*(float *)(a1 + 676) - *(float *)(a1 + 672))));
Slider::setValue(*(_QWORD *)(a1 + 704), v18);
}
ConfigureValuePopup::updateTextInputLabel(a1);
sub_14003D310((__int64)a6);
sub_14003D310(a7);
return 1;
}
else
{
sub_14003D310((__int64)a6);
sub_14003D310(a7);
return 0;
}
}