{"type": "func", "start": 5372327264, "end": 5372327735, "name": "OptionsLayer::layerHidden", "pseudocode": "// \n// OptionsLayer::layerHidden from 0x140373560 to 0x140373737 (471 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405c4860\n// > <???> @ 0x1406d5b40\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 OptionsLayer::layerHidden(OptionsLayer *a1)\n{\n  int v2; // ecx\n  int v3; // ecx\n  cocos2d::CCNode *v4; // rax\n  GJDropDownLayer *v5; // rbx\n  cocos2d::CCNode *v6; // rax\n  void (*showLayer)(GJDropDownLayer *, bool); // r8\n  cocos2d::CCNode *v8; // rbx\n  cocos2d::CCNode *v9; // rax\n  _BOOL8 v10; // rdx\n\n  v2 = a1->m_layerChoice - 1;\n  if ( !v2 )\n  {\n    v4 = SongsLayer::create();\nLABEL_12:\n    v8 = v4;\n    v9 = a1->getParent(a1);\n    v9->addChild_0(v9, v8, 100);\n    ((void (__fastcall *)(cocos2d::CCNode *, _QWORD))v8->__vftable[1].getPosition)(v8, 0);\n    goto LABEL_13;\n  }\n  v3 = v2 - 1;\n  if ( v3 )\n  {\n    if ( v3 != 1 )\n      goto LABEL_13;\n    v4 = AccountLayer::create();\n    goto LABEL_12;\n  }\n  v5 = (GJDropDownLayer *)operator new(0x280u);\n  GJDropDownLayer::GJDropDownLayer(v5);\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJDropDownLayer_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&SupportLayer::`vftable';\n  v5->cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&SupportLayer::`vftable';\n  v5[1].cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJDropDownLayer_vtbl *)&SupportLayer::`vftable';\n  *(_QWORD *)&v5[1].m_uID = &SupportLayer::`vftable';\n  *(_QWORD *)&v5[1].m_nTag = &SupportLayer::`vftable';\n  *(_QWORD *)&v5[1].m_uAutoReleaseCount = 0;\n  if ( GJDropDownLayer::init(v5, \"Support\", 220.0, 0) )\n  {\n    cocos2d::CCObject::autorelease(v5);\n  }\n  else\n  {\n    ((void (__fastcall *)(GJDropDownLayer *, __int64))v5->~GJDropDownLayer)(v5, 1);\n    v5 = nullptr;\n  }\n  v6 = a1->getParent(a1);\n  v6->addChild_0(v6, v5, 100);\n  showLayer = (void (*)(GJDropDownLayer *, bool))v5->showLayer;\n  if ( showLayer == GJDropDownLayer::showLayer )\n    GJDropDownLayer::showLayer(v5, 0);\n  else\n    showLayer(v5, 0);\nLABEL_13:\n  a1->setVisible(a1, 0);\n  if ( a1->m_closeOnHide )\n  {\n    LOBYTE(v10) = 1;\n    a1->removeFromParentAndCleanup(a1, v10);\n  }\n}", "assembly": "; \n; OptionsLayer::layerHidden from 0x140373560 to 0x140373737 (471 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405c4860\n; > <???> @ 0x1406d5b40\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, 0x140373560\npush    rdi                                                            ; +0x5, 0x140373565\nsub     rsp, 20h                                                       ; +0x6, 0x140373566\nmov     rdi, rcx                                                       ; +0xa, 0x14037356a\nmov     ecx, [rcx+278h]                                                ; +0xd, 0x14037356d\nsub     ecx, 1                                                         ; +0x13, 0x140373573\njz      loc_1403736CE                                                  ; +0x16, 0x140373576\nsub     ecx, 1                                                         ; +0x1c, 0x14037357c\njz      short loc_140373594                                            ; +0x1f, 0x14037357f\ncmp     ecx, 1                                                         ; +0x21, 0x140373581\njnz     loc_140373707                                                  ; +0x24, 0x140373584\ncall    AccountLayer__create                                           ; +0x2a, 0x14037358a\njmp     loc_1403736D3                                                  ; +0x2f, 0x14037358f\nmov     ecx, 280h; Size                                                ; +0x34, 0x140373594\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x39, 0x140373599\nmov     rbx, rax                                                       ; +0x3e, 0x14037359e\nmov     [rsp+28h+arg_0], rax                                           ; +0x41, 0x1403735a1\nmov     rcx, rax                                                       ; +0x46, 0x1403735a6\ncall    GJDropDownLayer__GJDropDownLayer                               ; +0x49, 0x1403735a9\nlea     rax, ??_7SupportLayer@@6B@; const SupportLayer::`vftable'      ; +0x4e, 0x1403735ae\nmov     [rbx], rax                                                     ; +0x55, 0x1403735b5\nlea     rax, ??_7SupportLayer@@6B@_0; const SupportLayer::`vftable'    ; +0x58, 0x1403735b8\nmov     [rbx+140h], rax                                                ; +0x5f, 0x1403735bf\nlea     rax, ??_7SupportLayer@@6B@_1; const SupportLayer::`vftable'    ; +0x66, 0x1403735c6\nmov     [rbx+148h], rax                                                ; +0x6d, 0x1403735cd\nlea     rax, ??_7SupportLayer@@6B@_2; const SupportLayer::`vftable'    ; +0x74, 0x1403735d4\nmov     [rbx+150h], rax                                                ; +0x7b, 0x1403735db\nlea     rax, ??_7SupportLayer@@6B@_3; const SupportLayer::`vftable'    ; +0x82, 0x1403735e2\nmov     [rbx+158h], rax                                                ; +0x89, 0x1403735e9\nlea     rax, ??_7SupportLayer@@6B@_4; const SupportLayer::`vftable'    ; +0x90, 0x1403735f0\nmov     [rbx+160h], rax                                                ; +0x97, 0x1403735f7\nlea     rax, ??_7SupportLayer@@6B@_5; const SupportLayer::`vftable'    ; +0x9e, 0x1403735fe\nmov     [rbx+198h], rax                                                ; +0xa5, 0x140373605\nlea     rax, ??_7SupportLayer@@6B@_6; const SupportLayer::`vftable'    ; +0xac, 0x14037360c\nmov     [rbx+1B0h], rax                                                ; +0xb3, 0x140373613\nlea     rax, ??_7SupportLayer@@6B@_7; const SupportLayer::`vftable'    ; +0xba, 0x14037361a\nmov     [rbx+260h], rax                                                ; +0xc1, 0x140373621\nlea     rax, ??_7SupportLayer@@6B@_8; const SupportLayer::`vftable'    ; +0xc8, 0x140373628\nmov     [rbx+268h], rax                                                ; +0xcf, 0x14037362f\nlea     rax, ??_7SupportLayer@@6B@_9; const SupportLayer::`vftable'    ; +0xd6, 0x140373636\nmov     [rbx+270h], rax                                                ; +0xdd, 0x14037363d\nmov     qword ptr [rbx+278h], 0                                        ; +0xe4, 0x140373644\nxor     r9d, r9d                                                       ; +0xef, 0x14037364f\nmovss   xmm2, cs:dword_1406233F4                                       ; +0xf2, 0x140373652\nlea     rdx, aSupport; \"Support\"                                       ; +0xfa, 0x14037365a\nmov     rcx, rbx                                                       ; +0x101, 0x140373661\ncall    GJDropDownLayer__init                                          ; +0x104, 0x140373664\nmov     rcx, rbx                                                       ; +0x109, 0x140373669\ntest    al, al                                                         ; +0x10c, 0x14037366c\njz      short loc_140373678                                            ; +0x10e, 0x14037366e\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x110, 0x140373670\njmp     short loc_140373685                                            ; +0x116, 0x140373676\nmov     rax, [rbx]                                                     ; +0x118, 0x140373678\nmov     edx, 1                                                         ; +0x11b, 0x14037367b\ncall    qword ptr [rax+8]                                              ; +0x120, 0x140373680\nxor     ebx, ebx                                                       ; +0x123, 0x140373683\nmov     rax, [rdi]                                                     ; +0x125, 0x140373685\nmov     rcx, rdi                                                       ; +0x128, 0x140373688\ncall    qword ptr [rax+1E8h]                                           ; +0x12b, 0x14037368b\nmov     r9, [rax]                                                      ; +0x131, 0x140373691\nmov     r8d, 64h ; 'd'                                                 ; +0x134, 0x140373694\nmov     rdx, rbx                                                       ; +0x13a, 0x14037369a\nmov     rcx, rax                                                       ; +0x13d, 0x14037369d\ncall    qword ptr [r9+1B8h]                                            ; +0x140, 0x1403736a0\nmov     rax, [rbx]                                                     ; +0x147, 0x1403736a7\nmov     r8, [rax+428h]                                                 ; +0x14a, 0x1403736aa\nlea     rax, GJDropDownLayer__showLayer                                ; +0x151, 0x1403736b1\nxor     edx, edx                                                       ; +0x158, 0x1403736b8\nmov     rcx, rbx                                                       ; +0x15a, 0x1403736ba\ncmp     r8, rax                                                        ; +0x15d, 0x1403736bd\njnz     short loc_1403736C9                                            ; +0x160, 0x1403736c0\ncall    GJDropDownLayer__showLayer                                     ; +0x162, 0x1403736c2\njmp     short loc_140373707                                            ; +0x167, 0x1403736c7\ncall    r8                                                             ; +0x169, 0x1403736c9\njmp     short loc_140373707                                            ; +0x16c, 0x1403736cc\ncall    SongsLayer__create                                             ; +0x16e, 0x1403736ce\nmov     rbx, rax                                                       ; +0x173, 0x1403736d3\nmov     rdx, [rdi]                                                     ; +0x176, 0x1403736d6\nmov     rcx, rdi                                                       ; +0x179, 0x1403736d9\ncall    qword ptr [rdx+1E8h]                                           ; +0x17c, 0x1403736dc\nmov     r9, [rax]                                                      ; +0x182, 0x1403736e2\nmov     r8d, 64h ; 'd'                                                 ; +0x185, 0x1403736e5\nmov     rdx, rbx                                                       ; +0x18b, 0x1403736eb\nmov     rcx, rax                                                       ; +0x18e, 0x1403736ee\ncall    qword ptr [r9+1B8h]                                            ; +0x191, 0x1403736f1\nmov     r8, [rbx]                                                      ; +0x198, 0x1403736f8\nxor     edx, edx                                                       ; +0x19b, 0x1403736fb\nmov     rcx, rbx                                                       ; +0x19d, 0x1403736fd\ncall    qword ptr [r8+428h]                                            ; +0x1a0, 0x140373700\nmov     rax, [rdi]                                                     ; +0x1a7, 0x140373707\nxor     edx, edx                                                       ; +0x1aa, 0x14037370a\nmov     rcx, rdi                                                       ; +0x1ac, 0x14037370c\ncall    qword ptr [rax+140h]                                           ; +0x1af, 0x14037370f\ncmp     byte ptr [rdi+248h], 0                                         ; +0x1b5, 0x140373715\njz      short loc_14037372C                                            ; +0x1bc, 0x14037371c\nmov     rax, [rdi]                                                     ; +0x1be, 0x14037371e\nmov     dl, 1                                                          ; +0x1c1, 0x140373721\nmov     rcx, rdi                                                       ; +0x1c3, 0x140373723\ncall    qword ptr [rax+1F8h]                                           ; +0x1c6, 0x140373726\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1cc, 0x14037372c\nadd     rsp, 20h                                                       ; +0x1d1, 0x140373731\npop     rdi                                                            ; +0x1d5, 0x140373735\nretn                                                                   ; +0x1d6, 0x140373736", "xrefs": ["<???> @ 0x1405c4860", "<???> @ 0x1406d5b40"], "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"}