{"type": "func", "start": 6442819040, "end": 6442819175, "name": "sub_180059DE0", "pseudocode": "// \n// sub_180059DE0 from 0x180059de0 to 0x180059e67 (135 bytes)\n// \n// 3 xrefs:\n// > sub_180059E68 @ 0x180059e6f\n// > <???> @ 0x1800fd138\n// > <???> @ 0x1801bcc94\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:21:48 +0000\n// \n\ncocos2d::CCMenu *__fastcall sub_180059DE0(cocos2d::CCMenu *Block, char a2)\n{\n  int v3; // esi\n\n  v3 = a2 & 1;\n  if ( (a2 & 2) != 0 )\n  {\n    sub_1800E49F8(Block, 448, *((_QWORD *)Block - 1), cocos2d::CCMenu::~CCMenu);\n    if ( v3 )\n      j_j_j_free_0((char *)Block - 8);\n    return (cocos2d::CCMenu *)((char *)Block - 8);\n  }\n  else\n  {\n    cocos2d::CCMenu::~CCMenu(Block);\n    if ( v3 )\n      j_j_free_0(Block);\n    return Block;\n  }\n}", "assembly": "; \n; sub_180059DE0 from 0x180059de0 to 0x180059e67 (135 bytes)\n; \n; 3 xrefs:\n; > sub_180059E68 @ 0x180059e6f\n; > <???> @ 0x1800fd138\n; > <???> @ 0x1801bcc94\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:21:48 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180059de0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180059de5\npush    rdi                                                            ; +0xa, 0x180059dea\nsub     rsp, 20h                                                       ; +0xb, 0x180059deb\nmov     rbx, rcx                                                       ; +0xf, 0x180059def\nmov     esi, edx                                                       ; +0x12, 0x180059df2\nand     esi, 1                                                         ; +0x14, 0x180059df4\ntest    dl, 2                                                          ; +0x17, 0x180059df7\njz      short loc_180059E3E                                            ; +0x1a, 0x180059dfa\nlea     r9, ??1CCMenu@cocos2d@@UEAA@XZ; cocos2d::CCMenu::~CCMenu(void) ; +0x1c, 0x180059dfc\nmov     r8, [rcx-8]                                                    ; +0x23, 0x180059e03\nmov     edx, 1C0h                                                      ; +0x27, 0x180059e07\ncall    sub_1800E49F8                                                  ; +0x2c, 0x180059e0c\ntest    esi, esi                                                       ; +0x31, 0x180059e11\njz      short loc_180059E2A                                            ; +0x33, 0x180059e13\nimul    rdx, [rbx-8], 1C0h                                             ; +0x35, 0x180059e15\nadd     rdx, 8                                                         ; +0x3d, 0x180059e1d\nlea     rcx, [rbx-8]; Block                                            ; +0x41, 0x180059e21\ncall    j_j_j_free_0                                                   ; +0x45, 0x180059e25\nlea     rax, [rbx-8]                                                   ; +0x4a, 0x180059e2a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x4e, 0x180059e2e\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x53, 0x180059e33\nadd     rsp, 20h                                                       ; +0x58, 0x180059e38\npop     rdi                                                            ; +0x5c, 0x180059e3c\nretn                                                                   ; +0x5d, 0x180059e3d\ncall    ??1CCMenu@cocos2d@@UEAA@XZ; cocos2d::CCMenu::~CCMenu(void)     ; +0x5e, 0x180059e3e\ntest    esi, esi                                                       ; +0x63, 0x180059e43\njz      short loc_180059E54                                            ; +0x65, 0x180059e45\nmov     edx, 1C0h                                                      ; +0x67, 0x180059e47\nmov     rcx, rbx; Block                                                ; +0x6c, 0x180059e4c\ncall    j_j_free_0                                                     ; +0x6f, 0x180059e4f\nmov     rax, rbx                                                       ; +0x74, 0x180059e54\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x77, 0x180059e57\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7c, 0x180059e5c\nadd     rsp, 20h                                                       ; +0x81, 0x180059e61\npop     rdi                                                            ; +0x85, 0x180059e65\nretn                                                                   ; +0x86, 0x180059e66", "xrefs": ["sub_180059E68 @ 0x180059e6f", "<???> @ 0x1800fd138", "<???> @ 0x1801bcc94"], "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"}