{"type": "func", "start": 4299957120, "end": 4299957513, "name": "EndLevelLayer::showLayer", "pseudocode": "// \n// EndLevelLayer::showLayer from 0x1004c2380 to 0x1004c2509 (393 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x10094f378\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 __fastcall EndLevelLayer::showLayer(EndLevelLayer *a1, bool a2)\n{\n  GameManager *v3; // rax\n  char v4; // r15\n  cocos2d::CCMoveTo *v5; // rax\n  cocos2d::CCEaseBounceOut *v6; // r14\n  cocos2d::CCCallFunc *v7; // rax\n  cocos2d::CCSequence *v8; // rax\n  cocos2d::CCFadeTo *v9; // rax\n  cocos2d::CCArray *m_coinsToAnimate; // rdi\n  float v11; // [rsp+0h] [rbp-1Ch]\n\n  v3 = GameManager::sharedState();\n  v4 = a2 | GameManager::getGameVariable(v3, \"0168\");\n  cocos2d::CCNode::stopAllActions(a1->m_mainLayer);\n  ((void (__fastcall *)(EndLevelLayer *))a1->layerVisible)(a1);\n  if ( v4 == 1 )\n  {\n    ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCPoint *))a1->m_mainLayer->setPosition)(\n      a1->m_mainLayer,\n      &a1->m_endPosition);\n    ((void (__fastcall *)(EndLevelLayer *, __int64))a1->setOpacity)(a1, 100);\n    ((void (__fastcall *)(EndLevelLayer *))a1->enterAnimFinished)(a1);\n    v11 = 0.0;\n    EndLevelLayer::playStarEffect(a1, 0.0);\n    EndLevelLayer::playCoinEffect(a1, 0.0);\n  }\n  else\n  {\n    v5 = cocos2d::CCMoveTo::create(1.0, &a1->m_endPosition);\n    v6 = cocos2d::CCEaseBounceOut::create(v5);\n    v7 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)0x541uLL);\n    v8 = sub_1003B5760(v6, v7, 0);\n    cocos2d::CCNode::runAction(a1->m_mainLayer, v8);\n    ((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setOpacity)(a1, 0);\n    v9 = cocos2d::CCFadeTo::create(1.0, 0x64u);\n    cocos2d::CCNode::runAction(a1, v9);\n    v11 = 0.69999999;\n    EndLevelLayer::playCoinEffect(a1, 0.69999999);\n    m_coinsToAnimate = a1->m_coinsToAnimate;\n    if ( m_coinsToAnimate )\n      v11 = (float)((float)(int)sub_100720070(m_coinsToAnimate) * 0.34999999) + 0.69999999;\n    EndLevelLayer::playStarEffect(a1, v11);\n  }\n  EndLevelLayer::playCurrencyEffect(a1, v11);\n  EndLevelLayer::playDiamondEffect(a1, v11);\n}", "assembly": "; \n; EndLevelLayer::showLayer from 0x1004c2380 to 0x1004c2509 (393 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x10094f378\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    rbp                                                            ; +0x0, 0x1004c2380\nmov     rbp, rsp                                                       ; +0x1, 0x1004c2381\npush    r15                                                            ; +0x4, 0x1004c2384\npush    r14                                                            ; +0x6, 0x1004c2386\npush    rbx                                                            ; +0x8, 0x1004c2388\npush    rax                                                            ; +0x9, 0x1004c2389\nmov     r14d, esi                                                      ; +0xa, 0x1004c238a\nmov     rbx, rdi                                                       ; +0xd, 0x1004c238d\ncall    GameManager__sharedState                                       ; +0x10, 0x1004c2390\nlea     rsi, a0168; \"0168\"                                             ; +0x15, 0x1004c2395\nmov     rdi, rax                                                       ; +0x1c, 0x1004c239c\ncall    GameManager__getGameVariable                                   ; +0x1f, 0x1004c239f\nmov     r15d, eax                                                      ; +0x24, 0x1004c23a4\nor      r15b, r14b                                                     ; +0x27, 0x1004c23a7\nmov     rdi, [rbx+240h]                                                ; +0x2a, 0x1004c23aa\ncall    cocos2d__CCNode__stopAllActions                                ; +0x31, 0x1004c23b1\nmov     rax, [rbx]                                                     ; +0x36, 0x1004c23b6\nmov     rdi, rbx                                                       ; +0x39, 0x1004c23b9\ncall    qword ptr [rax+530h]                                           ; +0x3c, 0x1004c23bc\ncmp     r15b, 1                                                        ; +0x42, 0x1004c23c2\njnz     short loc_1004C241C                                            ; +0x46, 0x1004c23c6\nmov     rdi, [rbx+240h]                                                ; +0x48, 0x1004c23c8\nlea     rsi, [rbx+220h]                                                ; +0x4f, 0x1004c23cf\nmov     rax, [rdi]                                                     ; +0x56, 0x1004c23d6\ncall    qword ptr [rax+0B8h]                                           ; +0x59, 0x1004c23d9\nmov     rax, [rbx]                                                     ; +0x5f, 0x1004c23df\nmov     rdi, rbx                                                       ; +0x62, 0x1004c23e2\nmov     esi, 64h ; 'd'                                                 ; +0x65, 0x1004c23e5\ncall    qword ptr [rax+480h]                                           ; +0x6a, 0x1004c23ea\nmov     rax, [rbx]                                                     ; +0x70, 0x1004c23f0\nmov     rdi, rbx                                                       ; +0x73, 0x1004c23f3\ncall    qword ptr [rax+540h]                                           ; +0x76, 0x1004c23f6\nxorps   xmm0, xmm0                                                     ; +0x7c, 0x1004c23fc\nmovss   [rbp+var_1C], xmm0                                             ; +0x7f, 0x1004c23ff\nmov     rdi, rbx                                                       ; +0x84, 0x1004c2404\ncall    EndLevelLayer__playStarEffect                                  ; +0x87, 0x1004c2407\nxorps   xmm0, xmm0                                                     ; +0x8c, 0x1004c240c\nmov     rdi, rbx                                                       ; +0x8f, 0x1004c240f\ncall    EndLevelLayer__playCoinEffect                                  ; +0x92, 0x1004c2412\njmp     loc_1004C24E5                                                  ; +0x97, 0x1004c2417\nlea     rdi, [rbx+220h]                                                ; +0x9c, 0x1004c241c\nmovss   xmm0, cs:alpha                                                 ; +0xa3, 0x1004c2423\ncall    cocos2d__CCMoveTo__create                                      ; +0xab, 0x1004c242b\nmov     rdi, rax                                                       ; +0xb0, 0x1004c2430\ncall    cocos2d__CCEaseBounceOut__create                               ; +0xb3, 0x1004c2433\nmov     r14, rax                                                       ; +0xb8, 0x1004c2438\nmov     esi, 541h                                                      ; +0xbb, 0x1004c243b\nmov     rdi, rbx                                                       ; +0xc0, 0x1004c2440\nxor     edx, edx                                                       ; +0xc3, 0x1004c2443\ncall    cocos2d__CCCallFunc__create                                    ; +0xc5, 0x1004c2445\nmov     rdi, r14                                                       ; +0xca, 0x1004c244a\nmov     rsi, rax                                                       ; +0xcd, 0x1004c244d\nxor     edx, edx                                                       ; +0xd0, 0x1004c2450\nxor     eax, eax                                                       ; +0xd2, 0x1004c2452\ncall    sub_1003B5760                                                  ; +0xd4, 0x1004c2454\nmov     rdi, [rbx+240h]                                                ; +0xd9, 0x1004c2459\nmov     rsi, rax                                                       ; +0xe0, 0x1004c2460\ncall    cocos2d__CCNode__runAction                                     ; +0xe3, 0x1004c2463\nmov     rax, [rbx]                                                     ; +0xe8, 0x1004c2468\nmov     rdi, rbx                                                       ; +0xeb, 0x1004c246b\nxor     esi, esi                                                       ; +0xee, 0x1004c246e\ncall    qword ptr [rax+480h]                                           ; +0xf0, 0x1004c2470\nmovss   xmm0, cs:alpha                                                 ; +0xf6, 0x1004c2476\nmov     edi, 64h ; 'd'                                                 ; +0xfe, 0x1004c247e\ncall    cocos2d__CCFadeTo__create                                      ; +0x103, 0x1004c2483\nmov     rdi, rbx                                                       ; +0x108, 0x1004c2488\nmov     rsi, rax                                                       ; +0x10b, 0x1004c248b\ncall    cocos2d__CCNode__runAction                                     ; +0x10e, 0x1004c248e\nmovss   xmm0, cs:dword_100814FC4                                       ; +0x113, 0x1004c2493\nmov     rdi, rbx                                                       ; +0x11b, 0x1004c249b\nmovss   [rbp+var_1C], xmm0                                             ; +0x11e, 0x1004c249e\ncall    EndLevelLayer__playCoinEffect                                  ; +0x123, 0x1004c24a3\nmov     rdi, [rbx+278h]                                                ; +0x128, 0x1004c24a8\ntest    rdi, rdi                                                       ; +0x12f, 0x1004c24af\njz      short loc_1004C24D8                                            ; +0x132, 0x1004c24b2\ncall    sub_100720070                                                  ; +0x134, 0x1004c24b4\nmov     eax, eax                                                       ; +0x139, 0x1004c24b9\nxorps   xmm0, xmm0                                                     ; +0x13b, 0x1004c24bb\ncvtsi2ss xmm0, rax                                                     ; +0x13e, 0x1004c24be\nmulss   xmm0, cs:dword_100816000                                       ; +0x143, 0x1004c24c3\naddss   xmm0, cs:dword_100814FC4                                       ; +0x14b, 0x1004c24cb\nmovss   [rbp+var_1C], xmm0                                             ; +0x153, 0x1004c24d3\nmov     rdi, rbx                                                       ; +0x158, 0x1004c24d8\nmovss   xmm0, [rbp+var_1C]                                             ; +0x15b, 0x1004c24db\ncall    EndLevelLayer__playStarEffect                                  ; +0x160, 0x1004c24e0\nmov     rdi, rbx                                                       ; +0x165, 0x1004c24e5\nmovss   xmm0, [rbp+var_1C]                                             ; +0x168, 0x1004c24e8\ncall    EndLevelLayer__playCurrencyEffect                              ; +0x16d, 0x1004c24ed\nmov     rdi, rbx                                                       ; +0x172, 0x1004c24f2\nmovss   xmm0, [rbp+var_1C]                                             ; +0x175, 0x1004c24f5\nadd     rsp, 8                                                         ; +0x17a, 0x1004c24fa\npop     rbx                                                            ; +0x17e, 0x1004c24fe\npop     r14                                                            ; +0x17f, 0x1004c24ff\npop     r15                                                            ; +0x181, 0x1004c2501\npop     rbp                                                            ; +0x183, 0x1004c2503\njmp     EndLevelLayer__playDiamondEffect                               ; +0x184, 0x1004c2504", "xrefs": ["<???> @ 0x10094f378"], "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"}