//
// sub_1003941B8 from 0x1003941b8 to 0x100394500 (840 bytes)
//
// 2 xrefs:
// > EndLevelLayer::showLayer @ 0x100394130
// > EndLevelLayer::showLayer @ 0x10039417c
//
// 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:03:39 +0000
//
__int64 __fastcall sub_1003941B8(__int64 result, float a2)
{
__int64 v2; // x29
__int64 v3; // x30
__int64 v4; // d8
__int64 v5; // d9
__int64 v6; // x8
__int64 v8; // x21
__int64 v9; // x0
void *v10; // x20
__int64 v11; // x10
_DWORD *v12; // x9
int v13; // w8
int v14; // w9
bool v15; // zf
const char *v16; // x0
__int64 v17; // x8
int v18; // w22
void *v19; // x19
void *v20; // x0
const char *CString; // x0
_DWORD *v22; // x22
float32x2_t *v23; // x23
double v24; // d0
char v25; // w21
float *v26; // x0
float *v27; // x0
__int64 v28; // x1
__int64 v29; // x2
__int64 v30; // x3
__int64 v31; // x4
__int64 v32; // x5
__int64 v33; // x6
__int64 v34; // x7
__int64 v35; // x0
float *v36; // x0
__int64 v37; // x1
__int64 v38; // x2
__int64 v39; // x3
__int64 v40; // x4
__int64 v41; // x5
__int64 v42; // x6
__int64 v43; // x7
__int64 v44; // x0
float *v45; // x20
char v46; // w0
__int64 v47; // x1
__int64 v48; // x2
__int64 v49; // x3
__int64 v50; // x4
__int64 v51; // x5
__int64 v52; // x6
__int64 v53; // x7
__int64 v54; // x20
float *v55; // x21
char v56; // w0
__int64 v57; // x1
__int64 v58; // x2
__int64 v59; // x3
__int64 v60; // x4
__int64 v61; // x5
__int64 v62; // x6
__int64 v63; // x7
__int64 v64; // x21
float32x2_t v65; // [xsp+18h] [xbp-68h] BYREF
float32x2_t v66; // [xsp+20h] [xbp-60h] BYREF
_QWORD v67[11]; // [xsp+28h] [xbp-58h] BYREF
v6 = *(_QWORD *)(result + 608);
if ( v6 && *(_BYTE *)(v6 + 14644) == 1 )
{
v67[1] = v5;
v67[2] = v4;
v67[9] = v2;
v67[10] = v3;
v8 = result;
v9 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v9, v67);
v10 = cocos2d::CCNode::create();
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v8 + 576) + 464LL))(*(_QWORD *)(v8 + 576), v10, 10);
v11 = *(_QWORD *)(v8 + 608);
v12 = *(_DWORD **)(v11 + 1936);
v13 = v12[225];
if ( *(_BYTE *)(v11 + 14644) == 1 )
{
v14 = v12[237] - v12[238];
if ( v13 == 5 )
*(_DWORD *)(v8 + 672) = v14;
else
*(_DWORD *)(v8 + 668) = v14;
}
v15 = v13 == 5;
if ( v13 == 5 )
v16 = "GJ_bigMoon_001.png";
else
v16 = "GJ_bigStar_001.png";
v17 = 668;
if ( v15 )
v17 = 672;
v18 = *(_DWORD *)(v8 + v17);
v19 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v16);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v19 + 160LL))(v19, 0.8);
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v10 + 456LL))(v10, v19);
sub_1000262BC((float *)&v66, 15.0, 0.0);
(*(void (__fastcall **)(void *, float32x2_t *))(*(_QWORD *)v19 + 184LL))(v19, &v66);
v20 = sub_1003065B0("+%i", v18);
CString = (const char *)cocos2d::CCString::getCString((__int64)v20);
v22 = (_DWORD *)cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt");
sub_1000262BC((float *)&v66, 1.0, 0.5);
(*(void (__fastcall **)(_DWORD *, float32x2_t *))(*(_QWORD *)v22 + 296LL))(v22, &v66);
(*(void (__fastcall **)(void *, _DWORD *))(*(_QWORD *)v10 + 456LL))(v10, v22);
sub_1000262BC((float *)&v66, -2.0, -16.0);
(*(void (__fastcall **)(_DWORD *, float32x2_t *))(*(_QWORD *)v22 + 184LL))(v22, &v66);
v23 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v19 + 192LL))(v19);
sub_1000262BC((float *)&v65, -20.0, 0.0);
*(float32x2_t *)&v24 = sub_100026318(v23, &v65, &v66);
(*(void (__fastcall **)(_DWORD *, float32x2_t *, double))(*(_QWORD *)v22 + 184LL))(v22, &v66, v24);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v22 + 160LL))(v22, 0.7);
v22[7] = 4;
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v8 + 640);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v10 + 160LL))(v10, 3.0);
v25 = (unsigned __int8)cocos2d::CCCallFunc::create(v8, (__int64)sub_100394D68, 0);
v26 = cocos2d::CCScaleTo::create_1(0.3, 1.0);
LOBYTE(v23) = (unsigned __int8)cocos2d::CCEaseBounceOut::create((__int64)v26);
v27 = cocos2d::CCDelayTime::create(a2);
v35 = sub_10021D420((__int64)v27, v28, v29, v30, v31, v32, v33, v34, (char)v23);
cocos2d::CCNode::runAction((__int64)v10, v35);
v36 = cocos2d::CCDelayTime::create(a2 + 0.2);
v44 = sub_10021D420((__int64)v36, v37, v38, v39, v40, v41, v42, v43, v25);
cocos2d::CCNode::runAction((__int64)v10, v44);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v19 + 912LL))(v19, 0);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v22 + 1024LL))(v22, 0);
v45 = cocos2d::CCDelayTime::create(a2);
v46 = (unsigned __int8)cocos2d::CCFadeIn::create(0.3);
v54 = sub_10021D420((__int64)v45, v47, v48, v49, v50, v51, v52, v53, v46);
v55 = cocos2d::CCDelayTime::create(a2);
v56 = (unsigned __int8)cocos2d::CCFadeIn::create(0.3);
v64 = sub_10021D420((__int64)v55, v57, v58, v59, v60, v61, v62, v63, v56);
cocos2d::CCNode::runAction((__int64)v19, v54);
return cocos2d::CCNode::runAction((__int64)v22, v64);
}
return result;
}