{"type": "func", "start": 5369644784, "end": 5369644924, "name": "EditorUI::orderDownCustomItem", "pseudocode": "// \n// EditorUI::orderDownCustomItem from 0x1400e46f0 to 0x1400e477c (140 bytes)\n// \n// 2 xrefs:\n// > EditorUI::createCustomItems @ 0x1400e4a7a\n// > <???> @ 0x1406c8c7c\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\nvoid EditorUI::orderDownCustomItem(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  int v4; // edi\n  void *v5; // [rsp+30h] [rbp+8h]\n\n  if ( a1->m_selectedObjectIndex < 0 )\n  {\n    v3 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v5 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v5);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = (GameManager *)qword_1406C2ED8;\n    }\n    v4 = GameManager::reorderKey(v3, a1->m_selectedObjectIndex, 0);\n    if ( v4 != a1->m_selectedObjectIndex )\n    {\n      EditorUI::reloadCustomItems(a1);\n      a1->m_selectedObjectIndex = v4;\n      EditorUI::updateCreateMenu(a1, 0);\n    }\n  }\n}", "assembly": "; \n; EditorUI::orderDownCustomItem from 0x1400e46f0 to 0x1400e477c (140 bytes)\n; \n; 2 xrefs:\n; > EditorUI::createCustomItems @ 0x1400e4a7a\n; > <???> @ 0x1406c8c7c\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, 0x1400e46f0\npush    rdi                                                            ; +0x5, 0x1400e46f5\nsub     rsp, 20h                                                       ; +0x6, 0x1400e46f6\nmov     rbx, rcx                                                       ; +0xa, 0x1400e46fa\ncmp     dword ptr [rcx+4D8h], 0                                        ; +0xd, 0x1400e46fd\njge     short loc_1400E4771                                            ; +0x14, 0x1400e4704\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x16, 0x1400e4706\ntest    rcx, rcx                                                       ; +0x1d, 0x1400e470d\njnz     short loc_1400E4741                                            ; +0x20, 0x1400e4710\nmov     ecx, 668h; Size                                                ; +0x22, 0x1400e4712\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x27, 0x1400e4717\nmov     [rsp+28h+arg_0], rax                                           ; +0x2c, 0x1400e471c\nmov     rcx, rax                                                       ; +0x31, 0x1400e4721\ncall    sub_14017AB00                                                  ; +0x34, 0x1400e4724\nnop                                                                    ; +0x39, 0x1400e4729\nmov     cs:qword_1406C2ED8, rax                                        ; +0x3a, 0x1400e472a\nmov     rdx, [rax]                                                     ; +0x41, 0x1400e4731\nmov     rcx, rax                                                       ; +0x44, 0x1400e4734\ncall    qword ptr [rdx+48h]                                            ; +0x47, 0x1400e4737\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4a, 0x1400e473a\nxor     r8d, r8d                                                       ; +0x51, 0x1400e4741\nmov     edx, [rbx+4D8h]                                                ; +0x54, 0x1400e4744\ncall    GameManager__reorderKey                                        ; +0x5a, 0x1400e474a\nmov     edi, eax                                                       ; +0x5f, 0x1400e474f\ncmp     eax, [rbx+4D8h]                                                ; +0x61, 0x1400e4751\njz      short loc_1400E4771                                            ; +0x67, 0x1400e4757\nmov     rcx, rbx                                                       ; +0x69, 0x1400e4759\ncall    EditorUI__reloadCustomItems                                    ; +0x6c, 0x1400e475c\nmov     [rbx+4D8h], edi                                                ; +0x71, 0x1400e4761\nxor     edx, edx                                                       ; +0x77, 0x1400e4767\nmov     rcx, rbx                                                       ; +0x79, 0x1400e4769\ncall    EditorUI__updateCreateMenu                                     ; +0x7c, 0x1400e476c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x81, 0x1400e4771\nadd     rsp, 20h                                                       ; +0x86, 0x1400e4776\npop     rdi                                                            ; +0x8a, 0x1400e477a\nretn                                                                   ; +0x8b, 0x1400e477b", "xrefs": ["EditorUI::createCustomItems @ 0x1400e4a7a", "<???> @ 0x1406c8c7c"], "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"}