{"type": "func", "start": 7563088, "end": 7563320, "name": "GJLevelList::reorderLevel", "pseudocode": "// \n// GJLevelList::reorderLevel from 0x736750 to 0x736838 (232 bytes)\n// \n// 3 xrefs:\n// > GJLevelList::reorderLevelStep @ 0x73687c\n// > LevelListLayer::setIDPopupClosed @ 0xa77bf0\n// > <???> @ 0x3fdc8\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 v4; // x21\n  int *v5; // x0\n  int *m_finish; // x3\n  const void *v7; // x1\n  int *v8; // x3\n  __int64 v9; // x1\n  int *m_start; // x2\n  unsigned __int64 v11; // x3\n  int v12; // [xsp+3Ch] [xbp+3Ch] BYREF\n  int v13; // [xsp+44h] [xbp+44h] BYREF\n\n  v12 = a2;\n  v4 = a3;\n  v5 = std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(\n         a1->m_levels.m_start,\n         (__int64)a1->m_levels.m_finish,\n         &v12);\n  m_finish = a1->m_levels.m_finish;\n  if ( m_finish != v5 )\n  {\n    v7 = v5 + 1;\n    v13 = *v5;\n    if ( m_finish != v5 + 1 && ((char *)m_finish - (_BYTE *)v7) >> 2 )\n    {\n      memmove(v5, v7, (char *)m_finish - (_BYTE *)v7);\n      m_finish = a1->m_levels.m_finish;\n    }\n    v8 = m_finish - 1;\n    a1->m_levels.m_finish = v8;\n    v9 = 0;\n    m_start = a1->m_levels.m_start;\n    if ( (v4 & 0x80000000) == 0 )\n    {\n      v9 = v4;\n      v11 = v8 - m_start;\n      if ( v4 > v11 )\n        v9 = (int)v11;\n    }\n    std::vector<int>::insert((__int64)&a1->m_levels, (char *)&m_start[v9], &v13);\n  }\n  GJLevelList::updateLevelsString(a1);\n}", "assembly": "; \n; GJLevelList::reorderLevel from 0x736750 to 0x736838 (232 bytes)\n; \n; 3 xrefs:\n; > GJLevelList::reorderLevelStep @ 0x73687c\n; > LevelListLayer::setIDPopupClosed @ 0xa77bf0\n; > <???> @ 0x3fdc8\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x736750\nMOV             W3, #0                                                 ; +0x4, 0x736754\nMOV             X29, SP                                                ; +0x8, 0x736758\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x73675c\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x736760\nMOV             X19, X0                                                ; +0x14, 0x736764\nSTR             W1, [X29,#0x50+var_14]                                 ; +0x18, 0x736768\nLDR             X0, [X0,#0x140]                                        ; +0x1c, 0x73676c\nLDR             X4, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x736770\nLDR             X1, [X19,#0x148]                                       ; +0x24, 0x736774\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x28, 0x736778\nLDR             X4, [X4]                                               ; +0x2c, 0x73677c\nSXTW            X21, W2                                                ; +0x30, 0x736780\nADD             X2, X29, #0x50+var_14                                  ; +0x34, 0x736784\nSTR             X4, [X29,#0x50+var_8]                                  ; +0x38, 0x736788\nBL              _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops16_Iter_equals_valIKiEEET_SB_SB_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>,std::random_access_iterator_tag) ; +0x3c, 0x73678c\nMOV             X1, X0                                                 ; +0x40, 0x736790\nLDR             X3, [X19,#0x148]                                       ; +0x44, 0x736794\nCMP             X3, X0                                                 ; +0x48, 0x736798\nB.EQ            loc_7367FC                                             ; +0x4c, 0x73679c\nLDR             W2, [X1],#4; void *                                    ; +0x50, 0x7367a0\nADD             X22, X19, #0x140                                       ; +0x54, 0x7367a4\nSTR             W2, [X29,#0x50+var_C]                                  ; +0x58, 0x7367a8\nCMP             X3, X1                                                 ; +0x5c, 0x7367ac\nB.EQ            loc_7367C0                                             ; +0x60, 0x7367b0\nSUB             X2, X3, X1; size_t                                     ; +0x64, 0x7367b4\nASR             X4, X2, #2                                             ; +0x68, 0x7367b8\nCBNZ            X4, loc_736828                                         ; +0x6c, 0x7367bc\nSUB             X3, X3, #4                                             ; +0x70, 0x7367c0\nSTR             X3, [X22,#8]                                           ; +0x74, 0x7367c4\nMOV             X1, #0                                                 ; +0x78, 0x7367c8\nLDR             X2, [X19,#0x140]                                       ; +0x7c, 0x7367cc\nTBNZ            W21, #0x1F, loc_7367EC                                 ; +0x80, 0x7367d0\nSUB             X3, X3, X2                                             ; +0x84, 0x7367d4\nLSL             X1, X21, #2                                            ; +0x88, 0x7367d8\nASR             X3, X3, #2                                             ; +0x8c, 0x7367dc\nSBFIZ           X0, X3, #2, #0x20 ; ' '                                ; +0x90, 0x7367e0\nCMP             X21, X3                                                ; +0x94, 0x7367e4\nCSEL            X1, X0, X1, HI                                         ; +0x98, 0x7367e8\nADD             X1, X2, X1                                             ; +0x9c, 0x7367ec\nMOV             X0, X22                                                ; +0xa0, 0x7367f0\nADD             X2, X29, #0x50+var_C                                   ; +0xa4, 0x7367f4\nBL              _ZNSt6vectorIiSaIiEE6insertEN9__gnu_cxx17__normal_iteratorIPKiS1_EERS4_; std::vector<int>::insert(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int const&) ; +0xa8, 0x7367f8\nMOV             X0, X19; this                                          ; +0xac, 0x7367fc\nBL              _ZN11GJLevelList18updateLevelsStringEv; GJLevelList::updateLevelsString(void) ; +0xb0, 0x736800\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xb4, 0x736804\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xb8, 0x736808\nLDR             X0, [X20]                                              ; +0xbc, 0x73680c\nCMP             X1, X0                                                 ; +0xc0, 0x736810\nB.NE            loc_736834                                             ; +0xc4, 0x736814\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xc8, 0x736818\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xcc, 0x73681c\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xd0, 0x736820\nRET                                                                    ; +0xd4, 0x736824\nBL              .memmove                                               ; +0xd8, 0x736828\nLDR             X3, [X22,#8]                                           ; +0xdc, 0x73682c\nB               loc_7367C0                                             ; +0xe0, 0x736830\nBL              .__stack_chk_fail                                      ; +0xe4, 0x736834", "xrefs": ["GJLevelList::reorderLevelStep @ 0x73687c", "LevelListLayer::setIDPopupClosed @ 0xa77bf0", "<???> @ 0x3fdc8"], "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"}