{"type": "func", "start": 4295169488, "end": 4295169676, "name": "EditorUI::orderDownCustomItem", "pseudocode": "// \n// EditorUI::orderDownCustomItem from 0x1000315d0 to 0x10003168c (188 bytes)\n// \n// 1 xrefs:\n// > EditorUI::createCustomItems @ 0x1000318b1\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 __fastcall EditorUI::orderDownCustomItem(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v2; // rax\n  int v3; // eax\n  int v4; // r14d\n  GameManager *v5; // rax\n  int IntGameVariable; // r15d\n  GameManager *v7; // rax\n  int v8; // r12d\n  EditButtonBar *m_customTabBar; // r13\n  cocos2d::CCArray *CustomItems; // rax\n\n  if ( a1->m_selectedObjectIndex < 0 )\n  {\n    v2 = GameManager::sharedState();\n    v3 = GameManager::reorderKey(v2, a1->m_selectedObjectIndex, 0);\n    if ( v3 != a1->m_selectedObjectIndex )\n    {\n      v4 = v3;\n      v5 = GameManager::sharedState();\n      IntGameVariable = GameManager::getIntGameVariable(v5, \"0049\");\n      v7 = GameManager::sharedState();\n      v8 = GameManager::getIntGameVariable(v7, \"0050\");\n      m_customTabBar = a1->m_customTabBar;\n      CustomItems = EditorUI::createCustomItems(a1);\n      EditButtonBar::loadFromItems(m_customTabBar, CustomItems, IntGameVariable, v8, 1);\n      a1->m_selectedObjectIndex = v4;\n      EditorUI::updateCreateMenu(a1, 0);\n    }\n  }\n}", "assembly": "; \n; EditorUI::orderDownCustomItem from 0x1000315d0 to 0x10003168c (188 bytes)\n; \n; 1 xrefs:\n; > EditorUI::createCustomItems @ 0x1000318b1\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\npush    rbp                                                            ; +0x0, 0x1000315d0\nmov     rbp, rsp                                                       ; +0x1, 0x1000315d1\npush    r15                                                            ; +0x4, 0x1000315d4\npush    r14                                                            ; +0x6, 0x1000315d6\npush    r13                                                            ; +0x8, 0x1000315d8\npush    r12                                                            ; +0xa, 0x1000315da\npush    rbx                                                            ; +0xc, 0x1000315dc\npush    rax                                                            ; +0xd, 0x1000315dd\ncmp     dword ptr [rdi+4C0h], 0                                        ; +0xe, 0x1000315de\njns     short loc_100031607                                            ; +0x15, 0x1000315e5\nmov     rbx, rdi                                                       ; +0x17, 0x1000315e7\ncall    GameManager__sharedState                                       ; +0x1a, 0x1000315ea\nmov     esi, [rbx+4C0h]                                                ; +0x1f, 0x1000315ef\nmov     rdi, rax                                                       ; +0x25, 0x1000315f5\nxor     edx, edx                                                       ; +0x28, 0x1000315f8\ncall    GameManager__reorderKey                                        ; +0x2a, 0x1000315fa\ncmp     eax, [rbx+4C0h]                                                ; +0x2f, 0x1000315ff\njnz     short loc_100031616                                            ; +0x35, 0x100031605\nadd     rsp, 8                                                         ; +0x37, 0x100031607\npop     rbx                                                            ; +0x3b, 0x10003160b\npop     r12                                                            ; +0x3c, 0x10003160c\npop     r13                                                            ; +0x3e, 0x10003160e\npop     r14                                                            ; +0x40, 0x100031610\npop     r15                                                            ; +0x42, 0x100031612\npop     rbp                                                            ; +0x44, 0x100031614\nretn                                                                   ; +0x45, 0x100031615\nmov     r14d, eax                                                      ; +0x46, 0x100031616\ncall    GameManager__sharedState                                       ; +0x49, 0x100031619\nlea     rsi, a0049; \"0049\"                                             ; +0x4e, 0x10003161e\nmov     rdi, rax                                                       ; +0x55, 0x100031625\ncall    GameManager__getIntGameVariable                                ; +0x58, 0x100031628\nmov     r15d, eax                                                      ; +0x5d, 0x10003162d\ncall    GameManager__sharedState                                       ; +0x60, 0x100031630\nlea     rsi, a0050; \"0050\"                                             ; +0x65, 0x100031635\nmov     rdi, rax                                                       ; +0x6c, 0x10003163c\ncall    GameManager__getIntGameVariable                                ; +0x6f, 0x10003163f\nmov     r12d, eax                                                      ; +0x74, 0x100031644\nmov     r13, [rbx+248h]                                                ; +0x77, 0x100031647\nmov     rdi, rbx                                                       ; +0x7e, 0x10003164e\ncall    EditorUI__createCustomItems                                    ; +0x81, 0x100031651\nmov     rdi, r13                                                       ; +0x86, 0x100031656\nmov     rsi, rax                                                       ; +0x89, 0x100031659\nmov     edx, r15d                                                      ; +0x8c, 0x10003165c\nmov     ecx, r12d                                                      ; +0x8f, 0x10003165f\nmov     r8d, 1                                                         ; +0x92, 0x100031662\ncall    EditButtonBar__loadFromItems                                   ; +0x98, 0x100031668\nmov     [rbx+4C0h], r14d                                               ; +0x9d, 0x10003166d\nmov     rdi, rbx                                                       ; +0xa4, 0x100031674\nxor     esi, esi                                                       ; +0xa7, 0x100031677\nadd     rsp, 8                                                         ; +0xa9, 0x100031679\npop     rbx                                                            ; +0xad, 0x10003167d\npop     r12                                                            ; +0xae, 0x10003167e\npop     r13                                                            ; +0xb0, 0x100031680\npop     r14                                                            ; +0xb2, 0x100031682\npop     r15                                                            ; +0xb4, 0x100031684\npop     rbp                                                            ; +0xb6, 0x100031686\njmp     EditorUI__updateCreateMenu                                     ; +0xb7, 0x100031687", "xrefs": ["EditorUI::createCustomItems @ 0x1000318b1"], "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"}