//
// ReviewChoiceSheet::init from 0x7331a4 to 0x733728 (1412 bytes)
//
// 1 xrefs:
// > ReviewChoiceSheet::create @ 0x7338b4
//
// 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:58:22 +0000
//
GameManager *__fastcall ReviewChoiceSheet::init(
int a1,
int a2,
int a3,
const char *a4,
int a5,
_DWORD *a6,
_DWORD *a7,
char a8,
const char *a9)
{
int v13; // r3
float v15; // r2
int v16; // r3
float v17; // s17
float v18; // s16
float v19; // s14
float v20; // s18
float v21; // s16
size_t v22; // r0
const char *v23; // r1
int v24; // r10
int v25; // r11
size_t v26; // r0
size_t v27; // r0
_DWORD *v28; // r6
const cocos2d::CCPoint *v29; // r10
void (__fastcall *v30)(_DWORD *, _DWORD *); // r8
float v31; // s16
int v32; // r10
void (__fastcall *v33)(int, _DWORD *); // r8
float v34; // s16
int v35; // r10
void (__fastcall *v36)(int, _DWORD *); // r8
void (__fastcall *v37)(int, _DWORD *); // r3
void (__fastcall *v38)(int, _DWORD *); // r8
int InputNode; // r0
int v40; // r10
void (__fastcall *v41)(int, _DWORD *); // r8
int v42; // r7
unsigned int v43; // r6
int v44; // r0
ButtonSprite *v45; // r0
ButtonSprite *v46; // r0
int v47; // r7
unsigned int v48; // r1
void (__fastcall *v49)(int, _BYTE *); // r11
int v50; // [sp+0h] [bp-84h]
GameManager *v51; // [sp+10h] [bp-74h]
cocos2d::CCPoint *v52; // [sp+1Ch] [bp-68h]
cocos2d::CCPoint *v53; // [sp+1Ch] [bp-68h]
cocos2d::CCPoint *v54; // [sp+2Ch] [bp-58h]
float v55[2]; // [sp+34h] [bp-50h] BYREF
_BYTE v56[8]; // [sp+3Ch] [bp-48h] BYREF
_BYTE v57[8]; // [sp+44h] [bp-40h] BYREF
int v58; // [sp+4Ch] [bp-38h]
int v59; // [sp+50h] [bp-34h]
int v60[3]; // [sp+54h] [bp-30h] BYREF
int v61; // [sp+60h] [bp-24h] BYREF
int v62; // [sp+64h] [bp-20h]
int v63; // [sp+68h] [bp-1Ch]
_DWORD v64[4]; // [sp+6Ch] [bp-18h] BYREF
if ( !a2 )
return nullptr;
v13 = a6[1];
if ( *a6 == v13 )
return nullptr;
if ( -1431655765 * ((v13 - *a6) >> 2) != (a7[1] - *a7) >> 2 )
return nullptr;
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)a1);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v55);
LODWORD(v15) = a8 ? 179 : 132;
v16 = LODWORD(v15) + 1431655778 * ((a6[1] - *a6) >> 2) - 38;
v17 = (float)(unsigned int)v16;
v18 = a8
? FLAlertLayer::keyboardRaise(COERCE_FLALERTLAYER_((float)(unsigned int)v16), (float)(290.0 - v17) * 0.5, v15)
: 0.0;
v51 = SetupTriggerPopup::init((SetupTriggerPopup *)a1, nullptr, nullptr, 320.0, v17, (_BYTE *)&dword_0 + 1, v18);
if ( !v51 )
return nullptr;
*(_DWORD *)(a1 + 712) = a2;
v19 = v55[1];
*(_DWORD *)(a1 + 716) = a3;
v61 = 0;
v62 = 0;
v63 = 0;
v20 = v55[0] * 0.5;
v21 = (float)(v18 + (float)(v19 * 0.5)) + (float)(v17 * 0.5);
v22 = strlen(a4);
std::string::__init(&v61, a4, v22);
SetupTriggerPopup::addTitle(a1, (unsigned __int8 *)&v61);
std::string::~string((int)&v61);
v24 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v23);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v24 + 80))(v24, 1061997773);
v58 = 684;
v59 = 1;
v25 = CCMenuItemSpriteExtra::create(v24, 0, a1, 684, 1);
CCMenuItemSpriteExtra::setSizeMult(v25, 1.5);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v25);
v52 = *(cocos2d::CCPoint **)(*(_DWORD *)v25 + 92);
v54 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, (float)(v20 - 160.0) + 6.0, v21 - 10.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v64, v54);
((void (__fastcall *)(int, _DWORD *))v52)(v25, v64);
if ( a9 && *a9 )
{
memset(v60, 0, sizeof(v60));
v26 = strlen(a4);
std::string::__init(v60, a4, v26);
v61 = 0;
v62 = 0;
v63 = 0;
v27 = strlen(a9);
std::string::__init(&v61, a9, v27);
v28 = (_DWORD *)InfoAlertButton::create((char *)v60, (int)&v61, 1058642330);
std::string::~string((int)&v61);
std::string::~string((int)v60);
v28[104] = 1061997773;
(*(void (__fastcall **)(_DWORD, _DWORD *))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v28);
v29 = *(const cocos2d::CCPoint **)(a1 + 444);
v30 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v28 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, (float)(v20 + 160.0) - 22.0, v21 - 22.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v64, v29);
v30(v28, v64);
}
v31 = v21 - 52.0;
std::string::basic_string(&v61, a5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, 0.5, 0.5);
v32 = TextArea::create(
(int)&v61,
"chatFont.fnt",
1065353216,
1135542272,
(const cocos2d::CCPoint *)v64,
1101004800,
0,
0);
std::string::~string((int)&v61);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v32 + 80))(v32, 1061997773);
v33 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v32 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, v20, v31);
v33(v32, v64);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v32, 1);
v34 = v31 - 40.0;
if ( a8 )
{
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v64, 0.0, 0.0, 40.0, 40.0);
v35 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v64);
v36 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v35 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v64, 280.0, 26.0);
v36(v35, v64);
v37 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v35 + 480);
LOWORD(v64[0]) = 13405;
BYTE2(v64[0]) = 31;
v37(v35, v64);
v38 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v35 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, v20, v34 - 6.0);
v38(v35, v64);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v35, 0);
InputNode = GameToolbox::createInputNode(
(GameToolbox *)0x43860000,
26.0,
COERCE_FLOAT("Case note (optional)"),
(const char *)&dword_FC + 3,
v50);
*(_DWORD *)(a1 + 720) = InputNode;
v40 = InputNode;
v41 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)InputNode + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, v20, v34 - 6.0);
v41(v40, v64);
CCTextInputNode::setMaxLabelScale(*(_DWORD *)(a1 + 720), 0.9);
CCTextInputNode::setMaxLabelWidth(*(_DWORD *)(a1 + 720), 264.0);
v42 = *(_DWORD *)(a1 + 720);
v61 = 0;
v62 = 0;
v63 = 0;
std::string::__init(&v61, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,!?'\"-:;()/", 0x4Bu);
CCTextInputNode::setAllowedChars(v42, (unsigned __int8 *)&v61);
std::string::~string((int)&v61);
CCTextInputNode::setLabelPlaceholderScale(*(_DWORD *)(a1 + 720), 0.8);
*(_DWORD *)(*(_DWORD *)(a1 + 720) + 420) = a1 + 440;
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 460) + 232))(
*(_DWORD *)(a1 + 460),
*(_DWORD *)(a1 + 720),
5);
v34 = v34 - 47.0;
}
v43 = 0;
while ( v43 < -1431655765 * ((a6[1] - *a6) >> 2) )
{
v44 = *a6 + 12 * v43;
if ( (*(_BYTE *)v44 & 1) != 0 )
v45 = *(ButtonSprite **)(v44 + 8);
else
v45 = (ButtonSprite *)(v44 + 1);
v46 = ButtonSprite::create(
v45,
(const char *)&dword_F0,
0,
0.55,
1,
"bigFont.fnt",
*(char **)(*a7 + 4 * v43),
(const char *)0x41F00000,
*(float *)&v51);
v64[0] = ReviewChoiceSheet::onChoice;
v64[1] = 0;
v47 = CCMenuItemSpriteExtra::create((int)v46, 0, a1, (int)ReviewChoiceSheet::onChoice, 0);
CCMenuItemSpriteExtra::setSizeMult(v47, 1.1);
v48 = v43++;
(*(void (__fastcall **)(int, unsigned int))(*(_DWORD *)v47 + 36))(v47, v48);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v47);
v49 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v47 + 92);
v53 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v20, v34);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v57, v53);
v49(v47, v57);
v34 = v34 - 38.0;
}
return v51;
}