{"type": "func", "start": 4358208, "end": 4358570, "name": "EndLevelLayer::coinEnterFinished", "pseudocode": "// \n// EndLevelLayer::coinEnterFinished from 0x428040 to 0x4281aa (362 bytes)\n// \n// 1 xrefs:\n// > EndLevelLayer::coinEnterFinishedO @ 0x4281ec\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EndLevelLayer::coinEnterFinished(EndLevelLayer *a1, cocos2d::CCPoint a2)\n{\n  float x; // r4\n  bool v4; // r2\n  cocos2d::CCNode *v5; // r0\n  cocos2d::CCNode *v6; // r4\n  int v7; // r3\n  int v8; // r2\n  int v9; // s14\n  cocos2d::CCNode *(__fastcall *getChildByTag)(cocos2d::CCNode *__hidden, int); // r10\n  float v11; // s17\n  int v12; // r3\n  cocos2d::CCNode *(__fastcall *getParent)(cocos2d::CCNode *__hidden); // r3\n  FMODAudioEngine *v14; // r4\n  int v15; // r2\n  int v16; // r3\n  CCCircleWave *v17; // r0\n  char m_notLocal; // r3\n  cocos2d::CCNode *v19; // r4\n  char v20; // r2\n  CCCircleWave_vtbl *v21; // r3\n  cocos2d::CCPoint v22; // [sp+4h] [bp-1Ch] BYREF\n  cocos2d::CCPoint v23; // [sp+Ch] [bp-14h] BYREF\n  float v24; // [sp+14h] [bp-Ch]\n  int v25; // [sp+18h] [bp-8h]\n\n  x = a2.x;\n  cocos2d::CCPoint::CCPoint(&v23, 0.0, 0.0);\n  cocos2d::CCPoint::operator+(&v22, LODWORD(x), &v23);\n  v5 = (cocos2d::CCNode *)cocos2d::CCParticleSystemQuad::create(\n                            (cocos2d::CCParticleSystemQuad *)\"starEffect.plist\",\n                            nullptr,\n                            v4);\n  v6 = v5;\n  if ( a1->m_notLocal )\n  {\n    if ( a1->m_coinsVerified )\n    {\n      v7 = 255;\n      v8 = 255;\n    }\n    else\n    {\n      v7 = 75;\n      v8 = 175;\n    }\n    v9 = v7;\n    getChildByTag = v5->__vftable[1].getChildByTag;\n    v11 = (float)v8 / 255.0;\n    v12 = *(_DWORD *)(((int (__fastcall *)(cocos2d::CCNode *))v5->__vftable[1].addChild_1)(v5) + 12);\n    v23.x = 1.0;\n    v23.y = v11;\n    v25 = v12;\n    v24 = (float)v9 / 255.0;\n    getChildByTag(v6, (int)&v23);\n    getParent = v6->__vftable[1].getParent;\n    v23.x = 1.0;\n    v23.y = v11;\n    v25 = 0;\n    v24 = (float)v9 / 255.0;\n    ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *))getParent)(v6, &v23);\n  }\n  ((void (__fastcall *)(cocos2d::CCNode *, int))v6->__vftable[1].onEnter)(v6, 1);\n  a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, 9);\n  v6->setPosition(v6, &v22);\n  v14 = FMODAudioEngine::sharedEngine();\n  sub_776584((int)&v23, \"highscoreGet02.ogg\");\n  FMODAudioEngine::playEffect(v14, (int)&v23, v15, v16);\n  sub_774008(&v23);\n  v17 = CCCircleWave::create(10.0, 90.0, 0.4, 0);\n  m_notLocal = a1->m_notLocal;\n  v19 = v17;\n  if ( m_notLocal )\n  {\n    if ( a1->m_coinsVerified )\n    {\n      m_notLocal = -1;\n      v20 = -1;\n    }\n    else\n    {\n      m_notLocal = 75;\n      v20 = -81;\n    }\n  }\n  else\n  {\n    v20 = -1;\n  }\n  v17->m_color.b = m_notLocal;\n  v21 = v17->__vftable;\n  v17->m_color.r = -1;\n  v17->m_color.g = v20;\n  v21->setPosition(v17, &v22);\n  a1->m_mainLayer->addChild_0(a1->m_mainLayer, v19, 9);\n}", "assembly": "; \n; EndLevelLayer::coinEnterFinished from 0x428040 to 0x4281aa (362 bytes)\n; \n; 1 xrefs:\n; > EndLevelLayer::coinEnterFinishedO @ 0x4281ec\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x428040\nMOV             R4, R1                                                 ; +0x4, 0x428044\nVPUSH           {D8}                                                   ; +0x6, 0x428046\nMOVS            R1, #0; float                                          ; +0xa, 0x42804a\nLDR             R6, =(__stack_chk_guard_ptr - 0x428056)                ; +0xc, 0x42804c\nMOV             R2, R1; float                                          ; +0xe, 0x42804e\nMOV             R7, R0                                                 ; +0x10, 0x428050\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x12, 0x428052\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x14, 0x428054\nSUB             SP, SP, #0x20; bool                                    ; +0x16, 0x428056\nLDR             R3, [R6]                                               ; +0x18, 0x428058\nADD             R5, SP, #0x20+var_14                                   ; +0x1a, 0x42805a\nADD.W           R8, SP, #0x20+var_1C                                   ; +0x1c, 0x42805c\nMOV             R0, R5; this                                           ; +0x20, 0x428060\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x22, 0x428062\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x24, 0x428064\nMOV             R1, R4                                                 ; +0x28, 0x428068\nMOV             R0, R8                                                 ; +0x2a, 0x42806a\nMOV             R2, R5                                                 ; +0x2c, 0x42806c\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x2e, 0x42806e\nLDR             R0, =(aStareffectPlis - 0x42807A); \"starEffect.plist\"  ; +0x32, 0x428072\nMOVS            R1, #0; char *                                         ; +0x34, 0x428074\nADD             R0, PC; \"starEffect.plist\"                             ; +0x36, 0x428076\nBL              _ZN7cocos2d20CCParticleSystemQuad6createEPKcb; cocos2d::CCParticleSystemQuad::create(char const*,bool) ; +0x38, 0x428078\nLDRB.W          R3, [R7,#0x1E4]                                        ; +0x3c, 0x42807c\nMOV             R4, R0                                                 ; +0x40, 0x428080\nCBZ             R3, loc_4280F4                                         ; +0x42, 0x428082\nLDRB.W          R3, [R7,#0x1E5]                                        ; +0x44, 0x428084\nCBNZ            R3, loc_428090                                         ; +0x48, 0x428088\nMOVS            R3, #0x4B ; 'K'                                        ; +0x4a, 0x42808a\nMOVS            R2, #0xAF                                              ; +0x4c, 0x42808c\nB               loc_428094                                             ; +0x4e, 0x42808e\nMOVS            R3, #0xFF                                              ; +0x50, 0x428090\nMOV             R2, R3                                                 ; +0x52, 0x428092\nVMOV            S15, R2                                                ; +0x54, 0x428094\nLDR             R1, [R4]                                               ; +0x58, 0x428098\nVMOV            S14, R3                                                ; +0x5a, 0x42809a\nMOV             R0, R4                                                 ; +0x5e, 0x42809e\nVCVT.F32.S32    S17, S15                                               ; +0x60, 0x4280a0\nMOV.W           R9, #0x3F800000                                        ; +0x64, 0x4280a4\nVLDR            S15, =255.0                                            ; +0x68, 0x4280a8\nLDR.W           R3, [R1,#0x29C]                                        ; +0x6c, 0x4280ac\nLDR.W           R10, [R1,#0x2A0]                                       ; +0x70, 0x4280b0\nVCVT.F32.S32    S16, S14                                               ; +0x74, 0x4280b4\nVDIV.F32        S17, S17, S15                                          ; +0x78, 0x4280b8\nVDIV.F32        S16, S16, S15                                          ; +0x7c, 0x4280bc\nBLX             R3                                                     ; +0x80, 0x4280c0\nMOV             R1, R5                                                 ; +0x82, 0x4280c2\nLDR             R3, [R0,#0xC]                                          ; +0x84, 0x4280c4\nMOV             R0, R4                                                 ; +0x86, 0x4280c6\nSTR.W           R9, [SP,#0x20+var_14]                                  ; +0x88, 0x4280c8\nVSTR            S17, [SP,#0x20+var_10]                                 ; +0x8c, 0x4280cc\nSTR             R3, [SP,#0x20+var_8]                                   ; +0x90, 0x4280d0\nVSTR            S16, [SP,#0x20+var_C]                                  ; +0x92, 0x4280d2\nBLX             R10                                                    ; +0x96, 0x4280d6\nLDR             R3, [R4]                                               ; +0x98, 0x4280d8\nMOVS            R2, #0                                                 ; +0x9a, 0x4280da\nMOV             R0, R4                                                 ; +0x9c, 0x4280dc\nMOV             R1, R5                                                 ; +0x9e, 0x4280de\nLDR.W           R3, [R3,#0x2B0]                                        ; +0xa0, 0x4280e0\nSTR.W           R9, [SP,#0x20+var_14]                                  ; +0xa4, 0x4280e4\nVSTR            S17, [SP,#0x20+var_10]                                 ; +0xa8, 0x4280e8\nSTR             R2, [SP,#0x20+var_8]                                   ; +0xac, 0x4280ec\nVSTR            S16, [SP,#0x20+var_C]                                  ; +0xae, 0x4280ee\nBLX             R3                                                     ; +0xb2, 0x4280f2\nLDR             R3, [R4]                                               ; +0xb4, 0x4280f4\nMOV             R0, R4                                                 ; +0xb6, 0x4280f6\nMOVS            R1, #1                                                 ; +0xb8, 0x4280f8\nLDR.W           R3, [R3,#0x310]                                        ; +0xba, 0x4280fa\nBLX             R3                                                     ; +0xbe, 0x4280fe\nLDR.W           R0, [R7,#0x1D0]                                        ; +0xc0, 0x428100\nMOVS            R2, #9                                                 ; +0xc4, 0x428104\nMOV             R1, R4                                                 ; +0xc6, 0x428106\nLDR             R3, [R0]                                               ; +0xc8, 0x428108\nLDR.W           R3, [R3,#0xE0]                                         ; +0xca, 0x42810a\nBLX             R3                                                     ; +0xce, 0x42810e\nLDR             R3, [R4]                                               ; +0xd0, 0x428110\nMOV             R0, R4                                                 ; +0xd2, 0x428112\nMOV             R1, R8                                                 ; +0xd4, 0x428114\nLDR             R3, [R3,#0x5C]                                         ; +0xd6, 0x428116\nBLX             R3                                                     ; +0xd8, 0x428118\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0xda, 0x42811a\nLDR             R1, =(aHighscoreget02 - 0x428126); \"highscoreGet02.ogg\" ; +0xde, 0x42811e\nMOV             R2, SP                                                 ; +0xe0, 0x428120\nADD             R1, PC; \"highscoreGet02.ogg\"                           ; +0xe2, 0x428122\nMOV             R4, R0                                                 ; +0xe4, 0x428124\nMOV             R0, R5; int                                            ; +0xe6, 0x428126\nBL              sub_776584                                             ; +0xe8, 0x428128\nMOV             R0, R4                                                 ; +0xec, 0x42812c\nMOV             R1, R5                                                 ; +0xee, 0x42812e\nBL              _ZN15FMODAudioEngine10playEffectESs; FMODAudioEngine::playEffect(std::string) ; +0xf0, 0x428130\nMOV             R0, R5                                                 ; +0xf4, 0x428134\nBL              sub_774008                                             ; +0xf6, 0x428136\nMOVS            R3, #0; float                                          ; +0xfa, 0x42813a\nLDR             R0, =0x41200000; this                                  ; +0xfc, 0x42813c\nLDR             R1, flt_4281B4; float                                  ; +0xfe, 0x42813e\nLDR             R2, flt_4281B8; float                                  ; +0x100, 0x428140\nBL              _ZN12CCCircleWave6createEfffb; CCCircleWave::create(float,float,float,bool) ; +0x102, 0x428142\nLDRB.W          R3, [R7,#0x1E4]                                        ; +0x106, 0x428146\nMOV             R4, R0                                                 ; +0x10a, 0x42814a\nCBZ             R3, loc_42815A                                         ; +0x10c, 0x42814c\nLDRB.W          R3, [R7,#0x1E5]                                        ; +0x10e, 0x42814e\nCBNZ            R3, loc_42815E                                         ; +0x112, 0x428152\nMOVS            R3, #0x4B ; 'K'                                        ; +0x114, 0x428154\nMOVS            R2, #0xAF                                              ; +0x116, 0x428156\nB               loc_428162                                             ; +0x118, 0x428158\nMOVS            R2, #0xFF                                              ; +0x11a, 0x42815a\nB               loc_428162                                             ; +0x11c, 0x42815c\nMOVS            R3, #0xFF                                              ; +0x11e, 0x42815e\nMOV             R2, R3                                                 ; +0x120, 0x428160\nSTRB.W          R3, [R4,#0x11A]                                        ; +0x122, 0x428162\nMOVS            R1, #0xFF                                              ; +0x126, 0x428166\nLDR             R3, [R4]                                               ; +0x128, 0x428168\nMOV             R0, R4                                                 ; +0x12a, 0x42816a\nSTRB.W          R1, [R4,#0x118]                                        ; +0x12c, 0x42816c\nMOV             R1, R8                                                 ; +0x130, 0x428170\nSTRB.W          R2, [R4,#0x119]                                        ; +0x132, 0x428172\nLDR             R3, [R3,#0x5C]                                         ; +0x136, 0x428176\nBLX             R3                                                     ; +0x138, 0x428178\nLDR.W           R0, [R7,#0x1D0]                                        ; +0x13a, 0x42817a\nMOVS            R2, #9                                                 ; +0x13e, 0x42817e\nMOV             R1, R4                                                 ; +0x140, 0x428180\nLDR             R3, [R0]                                               ; +0x142, 0x428182\nLDR.W           R3, [R3,#0xE0]                                         ; +0x144, 0x428184\nBLX             R3                                                     ; +0x148, 0x428188\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x14a, 0x42818a\nLDR             R3, [R6]                                               ; +0x14c, 0x42818c\nCMP             R2, R3                                                 ; +0x14e, 0x42818e\nBEQ             loc_4281A0                                             ; +0x150, 0x428190\nBLX             __stack_chk_fail                                       ; +0x152, 0x428192\nMOV             R0, R5                                                 ; +0x156, 0x428196\nBL              sub_774008                                             ; +0x158, 0x428198\nBL              __cxa_end_cleanup                                      ; +0x15c, 0x42819c\nADD             SP, SP, #0x20 ; ' '                                    ; +0x160, 0x4281a0\nVPOP            {D8}                                                   ; +0x162, 0x4281a2\nPOP.W           {R4-R10,PC}                                            ; +0x166, 0x4281a6", "xrefs": ["EndLevelLayer::coinEnterFinishedO @ 0x4281ec"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}