//
// SecretLayer5::onSubmit from 0x6e58bc to 0x6e5b70 (692 bytes)
//
// 0 xrefs:
//
// 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:57:24 +0000
//
int __fastcall SecretLayer5::onSubmit(int this, cocos2d::CCObject *a2)
{
int v2; // r4
size_t v3; // r5
size_t v4; // r2
int v5; // r1
int v6; // r9
float *v7; // r6
MusicDownloadManager *v8; // r0
MusicDownloadManager *v9; // r6
int v10; // r0
unsigned int v11; // r2
FMODAudioEngine *v12; // r0
FMODAudioEngine *v13; // r7
int v14; // r0
int v15; // r9
int v16; // r11
int v17; // r1
float v18; // r1
cocos2d::CCSequence *v19; // r9
cocos2d::CCFiniteTimeAction *v20; // r0
cocos2d::CCAction *v21; // r0
float v22; // r1
cocos2d::CCSequence *v23; // r9
cocos2d::CCFiniteTimeAction *v24; // r0
cocos2d::CCAction *v25; // r0
GameLevelManager *v26; // r0
GameLevelManager *v27; // r9
float v28; // r1
cocos2d::CCSequence *v29; // r7
cocos2d::CCFiniteTimeAction *v30; // r0
cocos2d::CCAction *v31; // r0
void (__fastcall *v32)(int, _DWORD *); // [sp+Ch] [bp-78h]
_DWORD v33[2]; // [sp+18h] [bp-6Ch] BYREF
_DWORD v34[2]; // [sp+20h] [bp-64h] BYREF
_BYTE v35[12]; // [sp+28h] [bp-5Ch] BYREF
int v36[3]; // [sp+34h] [bp-50h] BYREF
int v37[3]; // [sp+40h] [bp-44h] BYREF
_BYTE v38[12]; // [sp+4Ch] [bp-38h] BYREF
int v39[3]; // [sp+58h] [bp-2Ch] BYREF
int v40[3]; // [sp+64h] [bp-20h] BYREF
int v41[3]; // [sp+70h] [bp-14h] BYREF
v2 = this;
if ( !*(_BYTE *)(this + 380) )
{
v3 = *(unsigned __int8 *)(this + 400);
if ( !*(_BYTE *)(this + 400) )
{
v4 = *(unsigned __int8 *)(this + 400);
*(_DWORD *)(this + 384) = v3;
std::string::assign((_DWORD *)(this + 388), &unk_B6B226, v4);
v5 = *(_DWORD *)(v2 + 356);
*(_BYTE *)(v2 + 380) = 1;
CCTextInputNode::getString((CCTextInputNode *)v35, v5);
v6 = *(_DWORD *)(v2 + 356);
v36[0] = v3;
v36[1] = v3;
v36[2] = v3;
std::string::__init(v36, &unk_B6B226, v3);
CCTextInputNode::setString(v6, (int)v36);
std::string::~string((int)v36);
v7 = *(float **)(v2 + 356);
memset(v37, 0, sizeof(v37));
std::string::__init(v37, " ", 1u);
CCTextInputNode::updateLabel(v7, (int)v37);
v8 = (MusicDownloadManager *)std::string::~string((int)v37);
v9 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v8);
v10 = rand();
v11 = 9982;
if ( (float)((float)v10 * 4.6566e-10) <= 0.5 )
v11 = 9983;
v12 = MusicDownloadManager::pathForSFX((MusicDownloadManager *)v38, v9, v11);
v13 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v12);
std::string::basic_string(v39, (int)v38);
v14 = rand();
FMODAudioEngine::playEffect(
v13,
(int)v39,
COERCE_INT((float)((float)((float)v14 * 4.6566e-10) * 0.1) + 0.9),
0,
COERCE_INT(0.5));
std::string::~string((int)v39);
memset(v40, 0, sizeof(v40));
std::string::__init(
v40,
"40a0.21a0.81a0.2a180a90a10a12a6a90a12a0a0a0a0a0a0a25a10a0a10a0a0a0.815686a0a1a0a1a0a4a1a0a0a0.733333a0a0a0a1a0a1"
"a0a0a0a0.2a0a0a0a0a0a0a0a0a2a1a1a0a0a26a0a0a0a0a0a0a0a0a0a0a0a0a0a0",
0xB3u);
v15 = GameToolbox::particleFromString((unsigned __int8 *)v40, 0, 0);
std::string::~string((int)v40);
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v2 + 232))(v2, v15, 30);
v32 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92);
v16 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 356) + 96))(*(_DWORD *)(v2 + 356));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, 0.0);
cocos2d::CCPoint::operator+(v34, v16, v33);
v32(v15, v34);
SecretLayer5::incrementChatIdx((SecretLayer5 *)v2, v17);
v19 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3E99999A, v18);
v20 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v2, SecretLayer5::fadeInSubmitMessage, 0);
v21 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v19, v20, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v2, v21);
v23 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(nullptr, v22);
v33[0] = SecretLayer5::animateHead;
v33[1] = 0;
v24 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v2, SecretLayer5::animateHead, 0);
v25 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v23, v24, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v2, v25);
SecretLayer5::hideTextInput((SecretLayer5 *)v2);
LoadingCircleSprite::fadeInCircle(*(LoadingCircleSprite **)(v2 + 444), 0, (cocos2d::CCFadeTo *)0x3F4CCCCD, 150.0);
v26 = (GameLevelManager *)(*(int (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v2 + 364) + 528))(
*(_DWORD *)(v2 + 364),
0);
v27 = (GameLevelManager *)GameLevelManager::sharedState(v26);
std::string::basic_string(v41, (int)v35);
GameLevelManager::getGJSecretReward(v27, (int)v41);
std::string::~string((int)v41);
v29 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x40800000, v28);
v34[0] = SecretLayer5::finishLoadingState;
v34[1] = 0;
v30 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v2, SecretLayer5::finishLoadingState, 0);
v31 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v29, v30, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v2, v31);
std::string::~string((int)v38);
return std::string::~string((int)v35);
}
}
return this;
}