//
// sub_10028E090 from 0x10028e090 to 0x10028eb59 (2761 bytes)
//
// 1 xrefs:
// > sub_10028CB20 @ 0x10028ccb5
//
// 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 12:27:48 +0000
//
__int64 __fastcall sub_10028E090(__int64 a1, __int64 a2)
{
__int64 v2; // r12
__int64 result; // rax
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // r14
__int64 v7; // rbx
__int64 v8; // rax
double v9; // xmm0_8
char *v10; // rbx
__int64 v11; // r13
void *v12; // rbx
__int64 v13; // rax
__m128 v14; // xmm1
__int64 v15; // r14
char *v16; // rax
_QWORD *v17; // r12
char *v18; // r15
__int64 v19; // rax
char *v20; // rbx
__int64 v21; // rax
__int64 v22; // r12
char *v23; // r15
const char *v24; // r15
__int64 v25; // r13
size_t v26; // rax
size_t v27; // rbx
char *v28; // r14
size_t v29; // r12
char *v30; // rcx
const char *v31; // r15
size_t v32; // rax
size_t v33; // rbx
char *v34; // r14
size_t v35; // r12
__int64 v36; // r15
__int64 v37; // rbx
unsigned __int64 *v38; // r14
float v39; // xmm0_4
__int64 v40; // r15
_QWORD *v41; // r13
char *v42; // rax
void *v43; // rbx
unsigned __int64 v44; // [rsp+8h] [rbp-118h] BYREF
__int64 v45; // [rsp+10h] [rbp-110h]
std::string v46; // [rsp+18h] [rbp-108h] BYREF
__int128 v47; // [rsp+30h] [rbp-F0h] BYREF
void *v48; // [rsp+40h] [rbp-E0h]
float v49[2]; // [rsp+50h] [rbp-D0h] BYREF
__int64 v50; // [rsp+58h] [rbp-C8h]
_QWORD __dst[2]; // [rsp+60h] [rbp-C0h] BYREF
void *v52; // [rsp+70h] [rbp-B0h]
_QWORD v53[2]; // [rsp+78h] [rbp-A8h] BYREF
void *__p; // [rsp+88h] [rbp-98h]
double v55[2]; // [rsp+94h] [rbp-8Ch] BYREF
unsigned __int64 v56; // [rsp+A4h] [rbp-7Ch] BYREF
float v57; // [rsp+ACh] [rbp-74h]
__int64 v58; // [rsp+B0h] [rbp-70h]
unsigned __int64 v59; // [rsp+BCh] [rbp-64h] BYREF
float v60; // [rsp+C4h] [rbp-5Ch]
__int64 v61; // [rsp+C8h] [rbp-58h]
__int128 v62; // [rsp+D0h] [rbp-50h] BYREF
void *v63; // [rsp+E0h] [rbp-40h]
float v64; // [rsp+ECh] [rbp-34h] BYREF
float v65; // [rsp+F0h] [rbp-30h]
unsigned __int8 v66; // [rsp+F7h] [rbp-29h]
v2 = a1;
LODWORD(v62) = -1778384896;
result = cocos2d::CCLayerColor::initWithColor(a1, &v62);
if ( (_BYTE)result )
{
v66 = result;
*(_QWORD *)(a1 + 664) = a2;
FLAlertLayer::incrementForcePrio(a1);
*(_BYTE *)(a1 + 596) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);
v4 = cocos2d::CCDirector::sharedDirector(a1, 1);
cocos2d::CCDirector::getWinSize(v49, v4);
sub_100278250(&v64, v49[0] * 0.5, v49[1] * 0.5);
v5 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v5;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v5);
sub_100278270((__int64)&v62, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v6 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", &v62);
sub_100278260((float *)&v62, 420.0, 280.0);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v6 + 320LL))(v6, &v62);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v6 + 184LL))(v6, &v64);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v6,
4294967294LL);
v7 = cocos2d::CCLabelBMFont::create_3("Social Links", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 0.69999999);
sub_100278250((float *)&v62, v64, (float)(v65 + 140.0) + -18.0);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v7 + 184LL))(v7, &v62);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v7);
v8 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v8;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v8, 10);
v9 = (*(double (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 184LL))(
*(_QWORD *)(a1 + 552),
&unk_100BE24D0);
*(_DWORD *)(a1 + 640) = -1;
v10 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_closeBtn_001.png", v9);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 160LL))(v10, 0.80000001);
v11 = 0;
v12 = CCMenuItemSpriteExtra::create((__int64)v10, 0, a1, (__int64)sub_10028EBF0, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v12, 1.5);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v12);
sub_100278250((float *)&v62, (float)(v64 + -210.0) + 8.0, (float)(v65 + 140.0) + -8.0);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v12 + 184LL))(v12, &v62);
v13 = sub_1007FE900(v12);
*(_QWORD *)(a1 + 672) = v13;
cocos2d::CCObject::retain(v13);
v60 = v65 + 58.0;
v45 = a1 + 544;
v61 = a1;
while ( 1 )
{
v14 = 0;
v14.f32[0] = (float)(int)v11 * 0.5;
sub_100278250(
(float *)&v56,
(float)((float)((v11 & 1) == 0 ? -1 : 1) * 95.0) + v64,
(float)(_mm_round_ss(v14, v14, 9).f32[0] * -46.0) + v60);
v15 = *(_QWORD *)(v2 + 664);
v16 = *(char **)(v15 + 704);
if ( v16 )
{
while ( 1 )
{
while ( 1 )
{
v18 = v16;
v19 = *((int *)v16 + 8);
if ( v11 >= v19 )
break;
v16 = *(char **)v18;
v17 = v18;
if ( !*(_QWORD *)v18 )
goto LABEL_11;
}
if ( v11 <= v19 )
break;
v16 = *((char **)v18 + 1);
if ( !v16 )
{
v17 = v18 + 8;
goto LABEL_11;
}
}
v22 = v61;
if ( (v18[40] & 1) == 0 )
{
LABEL_14:
v23 = v18 + 40;
v63 = *((void **)v23 + 2);
v62 = *(_OWORD *)v23;
goto LABEL_17;
}
}
else
{
v17 = (_QWORD *)(v15 + 704);
v18 = (char *)(v15 + 704);
LABEL_11:
v20 = (char *)operator new(0x40u);
*((_DWORD *)v20 + 8) = v11;
*(_OWORD *)(v20 + 40) = 0;
*((_QWORD *)v20 + 7) = 0;
*(_OWORD *)v20 = 0;
*((_QWORD *)v20 + 2) = v18;
*v17 = v20;
v21 = **(_QWORD **)(v15 + 696);
if ( v21 )
*(_QWORD *)(v15 + 696) = v21;
sub_10001B680(*(__int64 **)(v15 + 704), (__int64 *)v20);
++*(_QWORD *)(v15 + 712);
v18 = v20;
v22 = v61;
if ( (v20[40] & 1) == 0 )
goto LABEL_14;
}
sub_10001AD30(&v62, *((const void **)v18 + 7), *((_QWORD *)v18 + 6));
LABEL_17:
v50 = v11;
v58 = 32 * v11;
v24 = off_100B00D90[4 * v11];
v25 = cocos2d::CCLabelBMFont::create_3(v24, "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v22 + 584) + 456LL))(*(_QWORD *)(v22 + 584), v25);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL))(v25, 0.44999999);
sub_100278250((float *)v55, 0.5, 0.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v25 + 296LL))(v25, v55);
sub_100278250((float *)&v59, 0.0, 12.0);
sub_100278350(v55, &v56, &v59);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v25 + 184LL))(v25, v55);
v26 = strlen(v24);
if ( v26 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v27 = v26;
if ( v26 >= 0x17 )
{
v29 = (v26 | 7) + 1;
if ( (v26 | 7) == 0x17 )
v29 = 26;
v28 = (char *)operator new(v29);
v52 = v28;
__dst[0] = v29 | 1;
__dst[1] = v27;
v22 = v61;
LABEL_24:
memmove(v28, v24, v27);
goto LABEL_25;
}
LOBYTE(__dst[0]) = 2 * v26;
v28 = (char *)__dst + 1;
if ( v26 )
goto LABEL_24;
LABEL_25:
v30 = (char *)off_100B00D90 + v58;
v28[v27] = 0;
v58 = (__int64)v30;
v31 = *((const char **)v30 + 3);
v32 = strlen(v31);
if ( v32 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v33 = v32;
if ( v32 >= 0x17 )
{
v35 = (v32 | 7) + 1;
if ( (v32 | 7) == 0x17 )
v35 = 26;
v34 = (char *)operator new(v35);
__p = v34;
v53[0] = v35 | 1;
v53[1] = v33;
v22 = v61;
LABEL_32:
memmove(v34, v31, v33);
goto LABEL_33;
}
LOBYTE(v53[0]) = 2 * v32;
v34 = (char *)v53 + 1;
if ( v32 )
goto LABEL_32;
LABEL_33:
v34[v33] = 0;
v36 = InfoAlertButton::create(__dst, v53, 0.5);
if ( (v53[0] & 1) != 0 )
operator delete(__p);
if ( (__dst[0] & 1) != 0 )
operator delete(v52);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v22 + 552) + 456LL))(*(_QWORD *)(v22 + 552), v36);
v2 = v61;
v37 = *(_QWORD *)(v61 + 552);
v38 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 192LL))(v25);
v57 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 328LL))(v25);
v39 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v25 + 168LL))(v25);
sub_100278250((float *)&v44, (float)((float)(v57 * v39) * 0.5) + 10.0, 5.0);
sub_100278350((double *)&v59, v38, &v44);
cocos2d::CCNode::convertToNodeSpace(v55, v37, (unsigned int *)&v59);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v36 + 184LL))(v36, v55);
sub_100278270((__int64)v55, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u);
v40 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v55);
BYTE2(v55[0]) = 31;
LOWORD(v55[0]) = 13405;
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v40 + 960LL))(v40, v55);
sub_100278260((float *)v55, 160.0, 20.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v40 + 320LL))(v40, v55);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v2 + 584) + 464LL))(
*(_QWORD *)(v2 + 584),
v40,
0xFFFFFFFFLL);
sub_100278250((float *)&v59, 0.0, -1.0);
sub_100278350(v55, &v56, &v59);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v40 + 184LL))(v40, v55);
v41 = CCTextInputNode::create(
*(_QWORD *)(v58 + 8),
(__int64)"Thonburi",
0x18u,
(__int64)"bigFont.fnt",
160.0,
20.0);
if ( (v62 & 1) != 0 )
{
if ( *((_QWORD *)&v62 + 1) )
{
sub_10001AD30(&v47, v63, *((unsigned __int64 *)&v62 + 1));
LABEL_42:
CCTextInputNode::setString(v41, (__int64)&v47);
if ( (v47 & 1) != 0 )
operator delete(v48);
}
}
else if ( (_BYTE)v62 )
{
v48 = v63;
v47 = v62;
goto LABEL_42;
}
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(v2 + 584) + 464LL))(
*(_QWORD *)(v2 + 584),
v41,
20);
v41[73] = v45;
(*(void (__fastcall **)(_QWORD *, unsigned __int64 *))(*v41 + 184LL))(v41, &v56);
CCTextInputNode::setMaxLabelScale((__int64)v41, 0.5);
CCTextInputNode::setMaxLabelWidth((__int64)v41, 140.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v41[72] + 344LL))(v41[72], 0);
*((_DWORD *)v41 + 148) = *(_DWORD *)(v58 + 16);
v46.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x48u);
v46.__r_.__value_.__r.__words[0] = 73;
v46.__r_.__value_.__l.__size_ = 67;
strcpy(v46.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_'.");
CCTextInputNode::setAllowedChars((__int64)v41, &v46);
if ( (*(_BYTE *)&v46.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v46.__r_.__value_.__l.__data_);
CCTextInputNode::setLabelPlaceholderColor((__int64)v41, 15772280);
CCTextInputNode::setLabelPlaceholderScale((__int64)v41, 0.44999999);
CCTextInputNode::forceOffset();
(*(void (__fastcall **)(_QWORD *, __int64))(*v41 + 72LL))(v41, v50);
sub_1007FEBF0(*(_QWORD *)(v2 + 672), v41);
if ( (v62 & 1) != 0 )
operator delete(v63);
v11 = v50 + 1;
if ( v50 == 6 )
{
v42 = ButtonSprite::create_1(
(__int64)"OK",
0x32u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.60000002,
28.0);
v43 = CCMenuItemSpriteExtra::create((__int64)v42, 0, v2, (__int64)sub_10028EC80, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v43, 1.1);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v2 + 552) + 456LL))(*(_QWORD *)(v2 + 552), v43);
sub_100278250((float *)&v62, v64 + 95.0, (float)(v60 + -138.0) + -1.0);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v43 + 184LL))(v43, &v62);
return v66;
}
}
}
return result;
}