{"type": "func", "start": 5373381696, "end": 5373382108, "name": "MenuLayer::openOptions", "pseudocode": "// \n// MenuLayer::openOptions from 0x140474c40 to 0x140474ddc (412 bytes)\n// \n// 4 xrefs:\n// > MenuLayer::onOptions @ 0x140474c22\n// > MenuLayer::onOptionsInstant @ 0x140474c32\n// > MenuLayer::keyDown @ 0x1404755aa\n// > <???> @ 0x1409282e0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:32:40 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCAction *__fastcall MenuLayer::openOptions(__int64 a1, unsigned __int8 a2)\n{\n  _QWORD *v4; // rbx\n  struct cocos2d::CCAction *(__fastcall *v5)(cocos2d::CCNode *, char); // r8\n  struct cocos2d::CCAction *result; // rax\n  __int64 v7; // rax\n\n  v4 = operator new(0x2A0u);\n  GJDropDownLayer::GJDropDownLayer((__int64)v4);\n  *v4 = &OptionsLayer::`vftable';\n  v4[40] = &OptionsLayer::`vftable';\n  v4[41] = &OptionsLayer::`vftable';\n  v4[42] = &OptionsLayer::`vftable';\n  v4[43] = &OptionsLayer::`vftable';\n  v4[44] = &OptionsLayer::`vftable';\n  v4[51] = &OptionsLayer::`vftable';\n  v4[54] = &OptionsLayer::`vftable';\n  v4[76] = &OptionsLayer::`vftable';\n  v4[77] = &OptionsLayer::`vftable';\n  v4[78] = 0;\n  v4[79] = 0;\n  *((_DWORD *)v4 + 160) = 0;\n  *((_BYTE *)v4 + 644) = 0;\n  v4[81] = 0;\n  v4[82] = 0;\n  *((_DWORD *)v4 + 166) = -1;\n  if ( GJDropDownLayer::init(v4, (int)\"Settings\", 220.0, 0) )\n  {\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);\n  }\n  else\n  {\n    (*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 8LL))(v4, 1);\n    v4 = nullptr;\n  }\n  (*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v4, 100);\n  v5 = *(struct cocos2d::CCAction *(__fastcall **)(cocos2d::CCNode *, char))(*v4 + 1080LL);\n  if ( v5 == GJDropDownLayer::showLayer )\n    result = GJDropDownLayer::showLayer((cocos2d::CCNode *)v4, a2);\n  else\n    result = v5((cocos2d::CCNode *)v4, a2);\n  if ( a2 )\n  {\n    v7 = VideoOptionsLayer::create();\n    return (struct cocos2d::CCAction *)(*(__int64 (__fastcall **)(_QWORD *, __int64, __int64))(*v4 + 456LL))(\n                                         v4,\n                                         v7,\n                                         100);\n  }\n  return result;\n}", "assembly": "; \n; MenuLayer::openOptions from 0x140474c40 to 0x140474ddc (412 bytes)\n; \n; 4 xrefs:\n; > MenuLayer::onOptions @ 0x140474c22\n; > MenuLayer::onOptionsInstant @ 0x140474c32\n; > MenuLayer::keyDown @ 0x1404755aa\n; > <???> @ 0x1409282e0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:32:40 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140474c40\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140474c45\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140474c4a\npush    rdi                                                            ; +0xf, 0x140474c4f\nsub     rsp, 20h                                                       ; +0x10, 0x140474c50\nmovzx   edi, dl                                                        ; +0x14, 0x140474c54\nmov     rsi, rcx                                                       ; +0x17, 0x140474c57\nmov     ecx, 2A0h; Size                                                ; +0x1a, 0x140474c5a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1f, 0x140474c5f\nmov     rbx, rax                                                       ; +0x24, 0x140474c64\nmov     [rsp+28h+arg_0], rax                                           ; +0x27, 0x140474c67\nmov     rcx, rax                                                       ; +0x2c, 0x140474c6c\ncall    GJDropDownLayer__GJDropDownLayer                               ; +0x2f, 0x140474c6f\nlea     rax, ??_7OptionsLayer@@6B@; const OptionsLayer::`vftable'      ; +0x34, 0x140474c74\nmov     [rbx], rax                                                     ; +0x3b, 0x140474c7b\nlea     rax, ??_7OptionsLayer@@6B@_0; const OptionsLayer::`vftable'    ; +0x3e, 0x140474c7e\nmov     [rbx+140h], rax                                                ; +0x45, 0x140474c85\nlea     rax, ??_7OptionsLayer@@6B@_1; const OptionsLayer::`vftable'    ; +0x4c, 0x140474c8c\nmov     [rbx+148h], rax                                                ; +0x53, 0x140474c93\nlea     rax, ??_7OptionsLayer@@6B@_2; const OptionsLayer::`vftable'    ; +0x5a, 0x140474c9a\nmov     [rbx+150h], rax                                                ; +0x61, 0x140474ca1\nlea     rax, ??_7OptionsLayer@@6B@_3; const OptionsLayer::`vftable'    ; +0x68, 0x140474ca8\nmov     [rbx+158h], rax                                                ; +0x6f, 0x140474caf\nlea     rax, ??_7OptionsLayer@@6B@_4; const OptionsLayer::`vftable'    ; +0x76, 0x140474cb6\nmov     [rbx+160h], rax                                                ; +0x7d, 0x140474cbd\nlea     rax, ??_7OptionsLayer@@6B@_5; const OptionsLayer::`vftable'    ; +0x84, 0x140474cc4\nmov     [rbx+198h], rax                                                ; +0x8b, 0x140474ccb\nlea     rax, ??_7OptionsLayer@@6B@_6; const OptionsLayer::`vftable'    ; +0x92, 0x140474cd2\nmov     [rbx+1B0h], rax                                                ; +0x99, 0x140474cd9\nlea     rax, ??_7OptionsLayer@@6B@_7; const OptionsLayer::`vftable'    ; +0xa0, 0x140474ce0\nmov     [rbx+260h], rax                                                ; +0xa7, 0x140474ce7\nlea     rax, ??_7OptionsLayer@@6B@_8; const OptionsLayer::`vftable'    ; +0xae, 0x140474cee\nmov     [rbx+268h], rax                                                ; +0xb5, 0x140474cf5\nxor     ebp, ebp                                                       ; +0xbc, 0x140474cfc\nmov     [rbx+270h], rbp                                                ; +0xbe, 0x140474cfe\nmov     [rbx+278h], rbp                                                ; +0xc5, 0x140474d05\nmov     [rbx+280h], ebp                                                ; +0xcc, 0x140474d0c\nmov     [rbx+284h], bpl                                                ; +0xd2, 0x140474d12\nmov     [rbx+288h], rbp                                                ; +0xd9, 0x140474d19\nmov     [rbx+290h], rbp                                                ; +0xe0, 0x140474d20\nmov     dword ptr [rbx+298h], 0FFFFFFFFh                               ; +0xe7, 0x140474d27\nxor     r9d, r9d                                                       ; +0xf1, 0x140474d31\nmovss   xmm2, cs:dword_14083591C                                       ; +0xf4, 0x140474d34\nlea     rdx, aSettings; \"Settings\"                                     ; +0xfc, 0x140474d3c\nmov     rcx, rbx                                                       ; +0x103, 0x140474d43\ncall    GJDropDownLayer__init                                          ; +0x106, 0x140474d46\nmov     rcx, rbx                                                       ; +0x10b, 0x140474d4b\ntest    al, al                                                         ; +0x10e, 0x140474d4e\njz      short loc_140474D5A                                            ; +0x110, 0x140474d50\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x112, 0x140474d52\njmp     short loc_140474D68                                            ; +0x118, 0x140474d58\nmov     rax, [rbx]                                                     ; +0x11a, 0x140474d5a\nmov     edx, 1                                                         ; +0x11d, 0x140474d5d\ncall    qword ptr [rax+8]                                              ; +0x122, 0x140474d62\nmov     rbx, rbp                                                       ; +0x125, 0x140474d65\nmov     rax, [rsi]                                                     ; +0x128, 0x140474d68\nmov     r8d, 64h ; 'd'                                                 ; +0x12b, 0x140474d6b\nmov     rdx, rbx                                                       ; +0x131, 0x140474d71\nmov     rcx, rsi                                                       ; +0x134, 0x140474d74\ncall    qword ptr [rax+1C8h]                                           ; +0x137, 0x140474d77\nmov     rax, [rbx]                                                     ; +0x13d, 0x140474d7d\nmov     r8, [rax+438h]                                                 ; +0x140, 0x140474d80\nlea     rax, GJDropDownLayer__showLayer                                ; +0x147, 0x140474d87\nmovzx   edx, dil                                                       ; +0x14e, 0x140474d8e\nmov     rcx, rbx                                                       ; +0x152, 0x140474d92\ncmp     r8, rax                                                        ; +0x155, 0x140474d95\njnz     short loc_140474DA1                                            ; +0x158, 0x140474d98\ncall    GJDropDownLayer__showLayer                                     ; +0x15a, 0x140474d9a\njmp     short loc_140474DA4                                            ; +0x15f, 0x140474d9f\ncall    r8                                                             ; +0x161, 0x140474da1\ntest    dil, dil                                                       ; +0x164, 0x140474da4\njz      short loc_140474DC7                                            ; +0x167, 0x140474da7\ncall    VideoOptionsLayer__create                                      ; +0x169, 0x140474da9\nmov     rdx, [rbx]                                                     ; +0x16e, 0x140474dae\nmov     r9, [rdx+1C8h]                                                 ; +0x171, 0x140474db1\nmov     r8d, 64h ; 'd'                                                 ; +0x178, 0x140474db8\nmov     rdx, rax                                                       ; +0x17e, 0x140474dbe\nmov     rcx, rbx                                                       ; +0x181, 0x140474dc1\ncall    r9                                                             ; +0x184, 0x140474dc4\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x187, 0x140474dc7\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x18c, 0x140474dcc\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x191, 0x140474dd1\nadd     rsp, 20h                                                       ; +0x196, 0x140474dd6\npop     rdi                                                            ; +0x19a, 0x140474dda\nretn                                                                   ; +0x19b, 0x140474ddb", "xrefs": ["MenuLayer::onOptions @ 0x140474c22", "MenuLayer::onOptionsInstant @ 0x140474c32", "MenuLayer::keyDown @ 0x1404755aa", "<???> @ 0x1409282e0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}