{"type": "func", "start": 5369973920, "end": 5369974389, "name": "EndLevelLayer::showLayer", "pseudocode": "// \n// EndLevelLayer::showLayer from 0x140134ca0 to 0x140134e75 (469 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::showEndLayer @ 0x1403ac8dc\n// > PlayLayer::showEndLayer @ 0x1403ac8bc\n// > <???> @ 0x140555478\n// > <???> @ 0x1406c9ea0\n// > <???> @ 0x1406c9eac\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\n// Hidden C++ exception states: #wind=1\nvoid EndLevelLayer::showLayer(EndLevelLayer *a1, bool a2)\n{\n  float v2; // xmm3_4\n  GameManager *v5; // rcx\n  bool GameVariable; // bl\n  cocos2d::CCPoint *p_m_endPosition; // rdx\n  bool v8; // r9\n  __int64 v9; // rdx\n  float v10; // xmm6_4\n  struct cocos2d::CCMoveTo *v11; // rax\n  struct cocos2d::CCEaseBounceOut *v12; // rbx\n  __int64 v13; // rax\n  struct cocos2d::CCSequence *v14; // rax\n  cocos2d::ccColor3B *v15; // r8\n  struct cocos2d::CCFadeTo *v16; // rax\n  cocos2d::ccColor3B *v17; // r8\n  cocos2d::CCArray *m_coinsToAnimate; // rcx\n  float v19; // [rsp+20h] [rbp-18h]\n  float v20; // [rsp+20h] [rbp-18h]\n  void *v21; // [rsp+40h] [rbp+8h]\n\n  v5 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v21 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v21);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  GameVariable = GameManager::getGameVariable(v5, \"0168\");\n  cocos2d::CCNode::stopAllActions(a1->m_mainLayer);\n  a1->layerVisible(a1);\n  p_m_endPosition = &a1->m_endPosition;\n  v8 = 1;\n  if ( !GameVariable )\n    v8 = a2;\n  if ( v8 )\n  {\n    a1->m_mainLayer->setPosition_0(a1->m_mainLayer, p_m_endPosition);\n    LOBYTE(v9) = 100;\n    a1->setOpacity(&a1->cocos2d::CCRGBAProtocol, v9);\n    a1->enterAnimFinished(a1);\n    v10 = 0.0;\n    EndLevelLayer::playStarEffect(a1, 0.0);\n    EndLevelLayer::playCoinEffect(a1, 0.0);\n  }\n  else\n  {\n    v11 = cocos2d::CCMoveTo::create(1.0, p_m_endPosition);\n    v12 = cocos2d::CCEaseBounceOut::create(v11);\n    v13 = cocos2d::CCCallFunc::create(a1, sub_1401377B4);\n    v14 = cocos2d::CCSequence::create(v12, v13, 0);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1->m_mainLayer, (cocos2d::CCPoint)v14, v15, v2, v19);\n    a1->setOpacity(&a1->cocos2d::CCRGBAProtocol, 0);\n    v16 = cocos2d::CCFadeTo::create(1.0, 0x64u);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v16, v17, v2, v20);\n    v10 = 0.69999999;\n    EndLevelLayer::playCoinEffect(a1, 0.69999999);\n    m_coinsToAnimate = a1->m_coinsToAnimate;\n    if ( m_coinsToAnimate )\n      v10 = (float)((float)(int)cocos2d::CCArray::count(m_coinsToAnimate) * 0.34999999) + 0.69999999;\n    EndLevelLayer::playStarEffect(a1, v10);\n  }\n  EndLevelLayer::playCurrencyEffect(a1, v10);\n  EndLevelLayer::playDiamondEffect(a1, v10);\n}", "assembly": "; \n; EndLevelLayer::showLayer from 0x140134ca0 to 0x140134e75 (469 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::showEndLayer @ 0x1403ac8dc\n; > PlayLayer::showEndLayer @ 0x1403ac8bc\n; > <???> @ 0x140555478\n; > <???> @ 0x1406c9ea0\n; > <???> @ 0x1406c9eac\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140134ca0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140134ca5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140134caa\npush    rdi                                                            ; +0xf, 0x140134caf\nsub     rsp, 30h                                                       ; +0x10, 0x140134cb0\nmovaps  xmmword ptr [rsp+38h+var_18], xmm6                             ; +0x14, 0x140134cb4\nmovzx   ebp, dl                                                        ; +0x19, 0x140134cb9\nmov     rdi, rcx                                                       ; +0x1c, 0x140134cbc\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1f, 0x140134cbf\ntest    rcx, rcx                                                       ; +0x26, 0x140134cc6\njnz     short loc_140134CFA                                            ; +0x29, 0x140134cc9\nmov     ecx, 668h; Size                                                ; +0x2b, 0x140134ccb\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x30, 0x140134cd0\nmov     [rsp+38h+arg_0], rax                                           ; +0x35, 0x140134cd5\nmov     rcx, rax                                                       ; +0x3a, 0x140134cda\ncall    sub_14017AB00                                                  ; +0x3d, 0x140134cdd\nnop                                                                    ; +0x42, 0x140134ce2\nmov     cs:qword_1406C2ED8, rax                                        ; +0x43, 0x140134ce3\nmov     rdx, [rax]                                                     ; +0x4a, 0x140134cea\nmov     rcx, rax                                                       ; +0x4d, 0x140134ced\ncall    qword ptr [rdx+48h]                                            ; +0x50, 0x140134cf0\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x53, 0x140134cf3\nlea     rdx, a0168; \"0168\"                                             ; +0x5a, 0x140134cfa\ncall    GameManager__getGameVariable                                   ; +0x61, 0x140134d01\nmovzx   ebx, al                                                        ; +0x66, 0x140134d06\nmov     rcx, [rdi+240h]                                                ; +0x69, 0x140134d09\ncall    cs:?stopAllActions@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::stopAllActions(void) ; +0x70, 0x140134d10\nmov     rdx, [rdi]                                                     ; +0x76, 0x140134d16\nmov     rcx, rdi                                                       ; +0x79, 0x140134d19\ncall    qword ptr [rdx+438h]                                           ; +0x7c, 0x140134d1c\nlea     rdx, [rdi+220h]                                                ; +0x82, 0x140134d22\nmov     r9d, 1                                                         ; +0x89, 0x140134d29\ntest    bl, bl                                                         ; +0x8f, 0x140134d2f\ncmovz   r9d, ebp                                                       ; +0x91, 0x140134d31\ntest    r9b, r9b                                                       ; +0x95, 0x140134d35\njz      short loc_140134D87                                            ; +0x98, 0x140134d38\nmov     rcx, [rdi+240h]                                                ; +0x9a, 0x140134d3a\nmov     rax, [rcx]                                                     ; +0xa1, 0x140134d41\ncall    qword ptr [rax+0B8h]                                           ; +0xa4, 0x140134d44\nmov     rax, [rdi+198h]                                                ; +0xaa, 0x140134d4a\nmov     dl, 64h ; 'd'                                                  ; +0xb1, 0x140134d51\nlea     rcx, [rdi+198h]                                                ; +0xb3, 0x140134d53\ncall    qword ptr [rax+28h]                                            ; +0xba, 0x140134d5a\nmov     rax, [rdi]                                                     ; +0xbd, 0x140134d5d\nmov     rcx, rdi                                                       ; +0xc0, 0x140134d60\ncall    qword ptr [rax+448h]                                           ; +0xc3, 0x140134d63\nxorps   xmm6, xmm6                                                     ; +0xc9, 0x140134d69\nxorps   xmm1, xmm1                                                     ; +0xcc, 0x140134d6c\nmov     rcx, rdi                                                       ; +0xcf, 0x140134d6f\ncall    EndLevelLayer__playStarEffect                                  ; +0xd2, 0x140134d72\nxorps   xmm1, xmm1                                                     ; +0xd7, 0x140134d77\nmov     rcx, rdi                                                       ; +0xda, 0x140134d7a\ncall    EndLevelLayer__playCoinEffect                                  ; +0xdd, 0x140134d7d\njmp     loc_140134E46                                                  ; +0xe2, 0x140134d82\nmovss   xmm6, cs:flt_140622C24                                         ; +0xe7, 0x140134d87\nmovaps  xmm0, xmm6                                                     ; +0xef, 0x140134d8f\ncall    cs:?create@CCMoveTo@cocos2d@@SAPEAV12@MAEBVCCPoint@2@@Z; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const &) ; +0xf2, 0x140134d92\nmov     rcx, rax                                                       ; +0xf8, 0x140134d98\ncall    cs:?create@CCEaseBounceOut@cocos2d@@SAPEAV12@PEAVCCActionInterval@2@@Z; cocos2d::CCEaseBounceOut::create(cocos2d::CCActionInterval *) ; +0xfb, 0x140134d9b\nmov     rbx, rax                                                       ; +0x101, 0x140134da1\nlea     rdx, sub_1401377B4                                             ; +0x104, 0x140134da4\nmov     rcx, rdi                                                       ; +0x10b, 0x140134dab\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x10e, 0x140134dae\nxor     r8d, r8d                                                       ; +0x114, 0x140134db4\nmov     rdx, rax                                                       ; +0x117, 0x140134db7\nmov     rcx, rbx                                                       ; +0x11a, 0x140134dba\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x11d, 0x140134dbd\nmov     rdx, rax                                                       ; +0x123, 0x140134dc3\nmov     rcx, [rdi+240h]                                                ; +0x126, 0x140134dc6\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x12d, 0x140134dcd\nmov     rax, [rdi+198h]                                                ; +0x133, 0x140134dd3\nxor     edx, edx                                                       ; +0x13a, 0x140134dda\nlea     rcx, [rdi+198h]                                                ; +0x13c, 0x140134ddc\ncall    qword ptr [rax+28h]                                            ; +0x143, 0x140134de3\nmov     dl, 64h ; 'd'                                                  ; +0x146, 0x140134de6\nmovaps  xmm0, xmm6                                                     ; +0x148, 0x140134de8\ncall    cs:?create@CCFadeTo@cocos2d@@SAPEAV12@ME@Z; cocos2d::CCFadeTo::create(float,uchar) ; +0x14b, 0x140134deb\nmov     rdx, rax                                                       ; +0x151, 0x140134df1\nmov     rcx, rdi                                                       ; +0x154, 0x140134df4\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x157, 0x140134df7\nmovss   xmm6, cs:dword_140622B74                                       ; +0x15d, 0x140134dfd\nmovaps  xmm1, xmm6                                                     ; +0x165, 0x140134e05\nmov     rcx, rdi                                                       ; +0x168, 0x140134e08\ncall    EndLevelLayer__playCoinEffect                                  ; +0x16b, 0x140134e0b\nmov     rcx, [rdi+278h]                                                ; +0x170, 0x140134e10\ntest    rcx, rcx                                                       ; +0x177, 0x140134e17\njz      short loc_140134E3B                                            ; +0x17a, 0x140134e1a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x17c, 0x140134e1c\nmov     eax, eax                                                       ; +0x182, 0x140134e22\nxorps   xmm0, xmm0                                                     ; +0x184, 0x140134e24\ncvtsi2ss xmm0, rax                                                     ; +0x187, 0x140134e27\nmulss   xmm0, cs:dword_140622ABC                                       ; +0x18c, 0x140134e2c\naddss   xmm0, xmm6                                                     ; +0x194, 0x140134e34\nmovaps  xmm6, xmm0                                                     ; +0x198, 0x140134e38\nmovaps  xmm1, xmm6                                                     ; +0x19b, 0x140134e3b\nmov     rcx, rdi                                                       ; +0x19e, 0x140134e3e\ncall    EndLevelLayer__playStarEffect                                  ; +0x1a1, 0x140134e41\nmovaps  xmm1, xmm6                                                     ; +0x1a6, 0x140134e46\nmov     rcx, rdi                                                       ; +0x1a9, 0x140134e49\ncall    EndLevelLayer__playCurrencyEffect                              ; +0x1ac, 0x140134e4c\nmovaps  xmm1, xmm6                                                     ; +0x1b1, 0x140134e51\nmov     rcx, rdi                                                       ; +0x1b4, 0x140134e54\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1b7, 0x140134e57\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x1bc, 0x140134e5c\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x1c1, 0x140134e61\nmovaps  xmm6, xmmword ptr [rsp+38h+var_18]                             ; +0x1c6, 0x140134e66\nadd     rsp, 30h                                                       ; +0x1cb, 0x140134e6b\npop     rdi                                                            ; +0x1cf, 0x140134e6f\njmp     EndLevelLayer__playDiamondEffect                               ; +0x1d0, 0x140134e70", "xrefs": ["PlayLayer::showEndLayer @ 0x1403ac8dc", "PlayLayer::showEndLayer @ 0x1403ac8bc", "<???> @ 0x140555478", "<???> @ 0x1406c9ea0", "<???> @ 0x1406c9eac"], "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"}