{"type": "func", "start": 5372561152, "end": 5372561651, "name": "PlayLayer::showEndLayer", "pseudocode": "// \n// PlayLayer::showEndLayer from 0x1403ac700 to 0x1403ac8f3 (499 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::showCompleteText @ 0x1403a8eb0\n// > <???> @ 0x1406d6c5c\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=2\nvoid PlayLayer::showEndLayer(PlayLayer *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCEGLView *v3; // rax\n  UILayer *m_uiLayer; // rcx\n  EndLevelLayer *v5; // rbx\n  void (*showLayer)(EndLevelLayer *, bool); // r8\n\n  *(_BYTE *)(cocos2d::CCEGLView::sharedOpenGLView(a1) + 237) = 0;\n  v3 = (cocos2d::CCEGLView *)cocos2d::CCEGLView::sharedOpenGLView(v2);\n  cocos2d::CCEGLView::showCursor(v3, 1);\n  PlayerObject::releaseAllButtons(a1->m_player1);\n  m_uiLayer = a1->m_uiLayer;\n  *(_QWORD *)&m_uiLayer->m_p1TouchId = -1;\n  *(_WORD *)&m_uiLayer->m_p1Jumping = 0;\n  m_uiLayer->m_checkpointBtnDown = 0;\n  UILayer::resetUINodeState(m_uiLayer);\n  UILayer::toggleMenuVisibility(a1->m_uiLayer, 0);\n  a1->m_hasCompletedLevel = 1;\n  v5 = (EndLevelLayer *)operator new(0x2B0u);\n  GJDropDownLayer::GJDropDownLayer(v5);\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (EndLevelLayer_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&EndLevelLayer::`vftable';\n  v5->GJDropDownLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&EndLevelLayer::`vftable';\n  v5->m_playLayer = nullptr;\n  *(_DWORD *)&v5->m_notLocal = 0;\n  *(_WORD *)&v5->m_animateCoins = 0;\n  v5->m_sideMenu = nullptr;\n  v5->m_coinsToAnimate = nullptr;\n  cocos2d::CCPoint::CCPoint(&v5->m_starsPosition);\n  cocos2d::CCPoint::CCPoint(&v5->m_orbsPosition);\n  cocos2d::CCPoint::CCPoint(&v5->m_diamondsPosition);\n  *(_QWORD *)&v5->m_orbs = 0;\n  *(_QWORD *)&v5->m_moons = 0;\n  v5->m_hidden = 0;\n  v5->m_playLayer = a1;\n  if ( GJDropDownLayer::init(v5, \" \", 230.0, 1) )\n  {\n    cocos2d::CCObject::autorelease(v5);\n  }\n  else\n  {\n    ((void (__fastcall *)(EndLevelLayer *, __int64))v5->~EndLevelLayer)(v5, 1);\n    v5 = nullptr;\n  }\n  a1->addChild_0(a1, v5, 1001);\n  showLayer = (void (*)(EndLevelLayer *, bool))v5->showLayer;\n  if ( showLayer == EndLevelLayer::showLayer )\n    EndLevelLayer::showLayer(v5, 0);\n  else\n    showLayer(v5, 0);\n}", "assembly": "; \n; PlayLayer::showEndLayer from 0x1403ac700 to 0x1403ac8f3 (499 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::showCompleteText @ 0x1403a8eb0\n; > <???> @ 0x1406d6c5c\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, 0x1403ac700\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1403ac705\npush    rdi                                                            ; +0xa, 0x1403ac70a\nsub     rsp, 20h                                                       ; +0xb, 0x1403ac70b\nmov     rdi, rcx                                                       ; +0xf, 0x1403ac70f\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x12, 0x1403ac712\nmov     byte ptr [rax+0EDh], 0                                         ; +0x18, 0x1403ac718\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x1f, 0x1403ac71f\nmov     rcx, rax                                                       ; +0x25, 0x1403ac725\nmov     dl, 1                                                          ; +0x28, 0x1403ac728\ncall    cs:?showCursor@CCEGLView@cocos2d@@QEAAX_N@Z; cocos2d::CCEGLView::showCursor(bool) ; +0x2a, 0x1403ac72a\nmov     rcx, [rdi+0DA0h]                                               ; +0x30, 0x1403ac730\ncall    PlayerObject__releaseAllButtons                                ; +0x37, 0x1403ac737\nmov     rcx, [rdi+3540h]                                               ; +0x3c, 0x1403ac73c\nmov     qword ptr [rcx+248h], 0FFFFFFFFFFFFFFFFh                       ; +0x43, 0x1403ac743\nmov     word ptr [rcx+242h], 0                                         ; +0x4e, 0x1403ac74e\nmov     byte ptr [rcx+244h], 0                                         ; +0x57, 0x1403ac757\ncall    UILayer__resetUINodeState                                      ; +0x5e, 0x1403ac75e\nxor     edx, edx                                                       ; +0x63, 0x1403ac763\nmov     rcx, [rdi+3540h]                                               ; +0x65, 0x1403ac765\ncall    UILayer__toggleMenuVisibility                                  ; +0x6c, 0x1403ac76c\nmov     byte ptr [rdi+397Dh], 1                                        ; +0x71, 0x1403ac771\nmov     ecx, 2B0h; Size                                                ; +0x78, 0x1403ac778\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7d, 0x1403ac77d\nmov     rbx, rax                                                       ; +0x82, 0x1403ac782\nmov     [rsp+28h+arg_0], rax                                           ; +0x85, 0x1403ac785\nmov     rcx, rax                                                       ; +0x8a, 0x1403ac78a\ncall    GJDropDownLayer__GJDropDownLayer                               ; +0x8d, 0x1403ac78d\nnop                                                                    ; +0x92, 0x1403ac792\nlea     rax, ??_7EndLevelLayer@@6B@; const EndLevelLayer::`vftable'    ; +0x93, 0x1403ac793\nmov     [rbx], rax                                                     ; +0x9a, 0x1403ac79a\nlea     rax, ??_7EndLevelLayer@@6B@_0; const EndLevelLayer::`vftable'  ; +0x9d, 0x1403ac79d\nmov     [rbx+140h], rax                                                ; +0xa4, 0x1403ac7a4\nlea     rax, ??_7EndLevelLayer@@6B@_1; const EndLevelLayer::`vftable'  ; +0xab, 0x1403ac7ab\nmov     [rbx+148h], rax                                                ; +0xb2, 0x1403ac7b2\nlea     rax, ??_7EndLevelLayer@@6B@_2; const EndLevelLayer::`vftable'  ; +0xb9, 0x1403ac7b9\nmov     [rbx+150h], rax                                                ; +0xc0, 0x1403ac7c0\nlea     rax, ??_7EndLevelLayer@@6B@_3; const EndLevelLayer::`vftable'  ; +0xc7, 0x1403ac7c7\nmov     [rbx+158h], rax                                                ; +0xce, 0x1403ac7ce\nlea     rax, ??_7EndLevelLayer@@6B@_4; const EndLevelLayer::`vftable'  ; +0xd5, 0x1403ac7d5\nmov     [rbx+160h], rax                                                ; +0xdc, 0x1403ac7dc\nlea     rax, ??_7EndLevelLayer@@6B@_5; const EndLevelLayer::`vftable'  ; +0xe3, 0x1403ac7e3\nmov     [rbx+198h], rax                                                ; +0xea, 0x1403ac7ea\nlea     rax, ??_7EndLevelLayer@@6B@_6; const EndLevelLayer::`vftable'  ; +0xf1, 0x1403ac7f1\nmov     [rbx+1B0h], rax                                                ; +0xf8, 0x1403ac7f8\nxor     esi, esi                                                       ; +0xff, 0x1403ac7ff\nmov     [rbx+260h], rsi                                                ; +0x101, 0x1403ac801\nmov     [rbx+268h], esi                                                ; +0x108, 0x1403ac808\nmov     [rbx+26Ch], si                                                 ; +0x10e, 0x1403ac80e\nmov     [rbx+270h], rsi                                                ; +0x115, 0x1403ac815\nmov     [rbx+278h], rsi                                                ; +0x11c, 0x1403ac81c\nlea     rcx, [rbx+280h]                                                ; +0x123, 0x1403ac823\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x12a, 0x1403ac82a\nlea     rcx, [rbx+288h]                                                ; +0x130, 0x1403ac830\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x137, 0x1403ac837\nlea     rcx, [rbx+290h]                                                ; +0x13d, 0x1403ac83d\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x144, 0x1403ac844\nmov     [rbx+298h], rsi                                                ; +0x14a, 0x1403ac84a\nmov     [rbx+2A0h], rsi                                                ; +0x151, 0x1403ac851\nmov     [rbx+2A9h], sil                                                ; +0x158, 0x1403ac858\nmov     [rbx+260h], rdi                                                ; +0x15f, 0x1403ac85f\nmov     r9b, 1                                                         ; +0x166, 0x1403ac866\nmovss   xmm2, cs:dword_140623400                                       ; +0x169, 0x1403ac869\nlea     rdx, asc_140518984; \" \"                                        ; +0x171, 0x1403ac871\nmov     rcx, rbx                                                       ; +0x178, 0x1403ac878\ncall    GJDropDownLayer__init                                          ; +0x17b, 0x1403ac87b\nmov     rcx, rbx                                                       ; +0x180, 0x1403ac880\ntest    al, al                                                         ; +0x183, 0x1403ac883\njz      short loc_1403AC88F                                            ; +0x185, 0x1403ac885\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x187, 0x1403ac887\njmp     short loc_1403AC89D                                            ; +0x18d, 0x1403ac88d\nmov     rax, [rbx]                                                     ; +0x18f, 0x1403ac88f\nmov     edx, 1                                                         ; +0x192, 0x1403ac892\ncall    qword ptr [rax+8]                                              ; +0x197, 0x1403ac897\nmov     rbx, rsi                                                       ; +0x19a, 0x1403ac89a\nmov     rax, [rdi]                                                     ; +0x19d, 0x1403ac89d\nmov     r8d, 3E9h                                                      ; +0x1a0, 0x1403ac8a0\nmov     rdx, rbx                                                       ; +0x1a6, 0x1403ac8a6\nmov     rcx, rdi                                                       ; +0x1a9, 0x1403ac8a9\ncall    qword ptr [rax+1B8h]                                           ; +0x1ac, 0x1403ac8ac\nmov     rax, [rbx]                                                     ; +0x1b2, 0x1403ac8b2\nmov     r8, [rax+428h]                                                 ; +0x1b5, 0x1403ac8b5\nlea     rax, EndLevelLayer__showLayer                                  ; +0x1bc, 0x1403ac8bc\nxor     edx, edx                                                       ; +0x1c3, 0x1403ac8c3\nmov     rcx, rbx                                                       ; +0x1c5, 0x1403ac8c5\ncmp     r8, rax                                                        ; +0x1c8, 0x1403ac8c8\njnz     short loc_1403AC8E1                                            ; +0x1cb, 0x1403ac8cb\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1cd, 0x1403ac8cd\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1d2, 0x1403ac8d2\nadd     rsp, 20h                                                       ; +0x1d7, 0x1403ac8d7\npop     rdi                                                            ; +0x1db, 0x1403ac8db\njmp     EndLevelLayer__showLayer                                       ; +0x1dc, 0x1403ac8dc\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1e1, 0x1403ac8e1\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1e6, 0x1403ac8e6\nadd     rsp, 20h                                                       ; +0x1eb, 0x1403ac8eb\npop     rdi                                                            ; +0x1ef, 0x1403ac8ef\njmp     r8                                                             ; +0x1f0, 0x1403ac8f0", "xrefs": ["PlayLayer::showCompleteText @ 0x1403a8eb0", "<???> @ 0x1406d6c5c"], "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"}