{"type": "func", "start": 5370245248, "end": 5370245482, "name": "GJLevelList::reorderLevel", "pseudocode": "// \n// GJLevelList::reorderLevel from 0x140177080 to 0x14017716a (234 bytes)\n// \n// 5 xrefs:\n// > LevelListLayer::cellPerformedAction @ 0x140306e63\n// > LevelListLayer::setIDPopupClosed @ 0x1403070b9\n// > <???> @ 0x140676a08\n// > <???> @ 0x140676a18\n// > <???> @ 0x1406cafb0\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 GJLevelList::reorderLevel(GJLevelList *a1, int a2, int a3)\n{\n  unsigned __int64 v3; // rbx\n  std::vector<int> *p_m_levels; // rdi\n  std::_Vector_val<std::_Simple_types<int>>::pointer v6; // rax\n  std::_Vector_val<std::_Simple_types<int>>::pointer Mylast; // r8\n  std::_Simple_types<int>::value_type v8; // ebp\n  std::_Simple_types<int>::value_type *v9; // rbx\n  char *v10; // rcx\n  std::_Simple_types<int>::value_type v11; // [rsp+30h] [rbp+8h] BYREF\n\n  v3 = a3;\n  p_m_levels = &a1->m_levels;\n  v6 = (std::_Vector_val<std::_Simple_types<int>>::pointer)unknown_libname_3(\n                                                             a1->m_levels._Mypair._Myval2._Myfirst,\n                                                             a1->m_levels._Mypair._Myval2._Mylast,\n                                                             (unsigned int)a2);\n  Mylast = a1->m_levels._Mypair._Myval2._Mylast;\n  if ( v6 != Mylast )\n  {\n    v8 = *v6;\n    v11 = *v6;\n    memmove(v6, v6 + 1, (char *)Mylast - (char *)(v6 + 1));\n    --a1->m_levels._Mypair._Myval2._Mylast;\n    if ( (v3 & 0x80000000) == 0LL )\n    {\n      if ( v3 > p_m_levels->_Mypair._Myval2._Mylast - p_m_levels->_Mypair._Myval2._Myfirst )\n        LODWORD(v3) = p_m_levels->_Mypair._Myval2._Mylast - p_m_levels->_Mypair._Myval2._Myfirst;\n    }\n    else\n    {\n      LODWORD(v3) = 0;\n    }\n    v9 = &p_m_levels->_Mypair._Myval2._Myfirst[(int)v3];\n    v10 = (char *)p_m_levels->_Mypair._Myval2._Mylast;\n    if ( v10 == (char *)p_m_levels->_Mypair._Myval2._Myend )\n    {\n      sub_140063270((const void **)&p_m_levels->_Mypair._Myval2._Myfirst, v9, &v11);\n    }\n    else if ( v9 == (std::_Simple_types<int>::value_type *)v10 )\n    {\n      *(_DWORD *)v10 = v8;\n      ++p_m_levels->_Mypair._Myval2._Mylast;\n    }\n    else\n    {\n      *(_DWORD *)v10 = *((_DWORD *)v10 - 1);\n      ++p_m_levels->_Mypair._Myval2._Mylast;\n      memmove(v9 + 1, v9, v10 - (char *)v9 - 4);\n      *v9 = v8;\n    }\n  }\n  GJLevelList::updateLevelsString(a1);\n}", "assembly": "; \n; GJLevelList::reorderLevel from 0x140177080 to 0x14017716a (234 bytes)\n; \n; 5 xrefs:\n; > LevelListLayer::cellPerformedAction @ 0x140306e63\n; > LevelListLayer::setIDPopupClosed @ 0x1403070b9\n; > <???> @ 0x140676a08\n; > <???> @ 0x140676a18\n; > <???> @ 0x1406cafb0\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_10], rbx                                              ; +0x0, 0x140177080\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x140177085\npush    rdi                                                            ; +0xa, 0x14017708a\nsub     rsp, 20h                                                       ; +0xb, 0x14017708b\nmovsxd  rbx, r8d                                                       ; +0xf, 0x14017708f\nlea     rdi, [rcx+140h]                                                ; +0x12, 0x140177092\nmov     r8d, edx                                                       ; +0x19, 0x140177099\nmov     rsi, rcx                                                       ; +0x1c, 0x14017709c\nmov     rdx, [rcx+148h]                                                ; +0x1f, 0x14017709f\nmov     rcx, [rdi]                                                     ; +0x26, 0x1401770a6\ncall    unknown_libname_3; Microsoft VisualC v14 64bit runtime         ; +0x29, 0x1401770a9\nmov     r8, [rsi+148h]                                                 ; +0x2e, 0x1401770ae\ncmp     rax, r8                                                        ; +0x35, 0x1401770b5\njz      loc_140177153                                                  ; +0x38, 0x1401770b8\nlea     rdx, [rax+4]; Src                                              ; +0x3e, 0x1401770be\nmov     [rsp+28h+arg_8], rbp                                           ; +0x42, 0x1401770c2\nmov     ebp, [rax]                                                     ; +0x47, 0x1401770c7\nsub     r8, rdx; Size                                                  ; +0x49, 0x1401770c9\nmov     rcx, rax; void *                                               ; +0x4c, 0x1401770cc\nmov     [rsp+28h+arg_0], ebp                                           ; +0x4f, 0x1401770cf\ncall    memmove                                                        ; +0x53, 0x1401770d3\nadd     qword ptr [rsi+148h], 0FFFFFFFFFFFFFFFCh                       ; +0x58, 0x1401770d8\ntest    ebx, ebx                                                       ; +0x60, 0x1401770e0\njns     short loc_1401770E8                                            ; +0x62, 0x1401770e2\nxor     ebx, ebx                                                       ; +0x64, 0x1401770e4\njmp     short loc_1401770F9                                            ; +0x66, 0x1401770e6\nmov     rcx, [rdi+8]                                                   ; +0x68, 0x1401770e8\nsub     rcx, [rdi]                                                     ; +0x6c, 0x1401770ec\nsar     rcx, 2                                                         ; +0x6f, 0x1401770ef\ncmp     rbx, rcx                                                       ; +0x73, 0x1401770f3\ncmova   ebx, ecx                                                       ; +0x76, 0x1401770f6\nmov     rax, [rdi]                                                     ; +0x79, 0x1401770f9\nmovsxd  rcx, ebx                                                       ; +0x7c, 0x1401770fc\nlea     rbx, [rax+rcx*4]                                               ; +0x7f, 0x1401770ff\nmov     rcx, [rdi+8]                                                   ; +0x83, 0x140177103\ncmp     rcx, [rdi+10h]                                                 ; +0x87, 0x140177107\njz      short loc_14017713E                                            ; +0x8b, 0x14017710b\ncmp     rbx, rcx                                                       ; +0x8d, 0x14017710d\njnz     short loc_14017711B                                            ; +0x90, 0x140177110\nmov     [rcx], ebp                                                     ; +0x92, 0x140177112\nadd     qword ptr [rdi+8], 4                                           ; +0x94, 0x140177114\njmp     short loc_14017714E                                            ; +0x99, 0x140177119\nmov     eax, [rcx-4]                                                   ; +0x9b, 0x14017711b\nmov     r8, rcx                                                        ; +0x9e, 0x14017711e\nmov     [rcx], eax                                                     ; +0xa1, 0x140177121\nsub     r8, rbx                                                        ; +0xa3, 0x140177123\nadd     qword ptr [rdi+8], 4                                           ; +0xa6, 0x140177126\nsub     r8, 4; Size                                                    ; +0xab, 0x14017712b\nsub     rcx, r8; void *                                                ; +0xaf, 0x14017712f\nmov     rdx, rbx; Src                                                  ; +0xb2, 0x140177132\ncall    memmove                                                        ; +0xb5, 0x140177135\nmov     [rbx], ebp                                                     ; +0xba, 0x14017713a\njmp     short loc_14017714E                                            ; +0xbc, 0x14017713c\nlea     r8, [rsp+28h+arg_0]                                            ; +0xbe, 0x14017713e\nmov     rdx, rbx                                                       ; +0xc3, 0x140177143\nmov     rcx, rdi                                                       ; +0xc6, 0x140177146\ncall    sub_140063270                                                  ; +0xc9, 0x140177149\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xce, 0x14017714e\nmov     rcx, rsi                                                       ; +0xd3, 0x140177153\nmov     rbx, [rsp+28h+arg_10]                                          ; +0xd6, 0x140177156\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xdb, 0x14017715b\nadd     rsp, 20h                                                       ; +0xe0, 0x140177160\npop     rdi                                                            ; +0xe4, 0x140177164\njmp     GJLevelList__updateLevelsString                                ; +0xe5, 0x140177165", "xrefs": ["LevelListLayer::cellPerformedAction @ 0x140306e63", "LevelListLayer::setIDPopupClosed @ 0x1403070b9", "<???> @ 0x140676a08", "<???> @ 0x140676a18", "<???> @ 0x1406cafb0"], "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"}