{"type": "func", "start": 4300614576, "end": 4300614765, "name": "GJLevelList::reorderLevel", "pseudocode": "// \n// GJLevelList::reorderLevel from 0x100562bb0 to 0x100562c6d (189 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::setIDPopupClosed @ 0x10035f9e7\n// > sub_10035FA50 @ 0x10035fa90\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 GJLevelList::reorderLevel(GJLevelList *a1, int a2, int a3)\n{\n  __int64 v3; // rax\n  std::__vector_base<int>::pointer begin; // rax\n  std::__vector_base<int>::pointer end; // r14\n  std::__vector_base<int>::pointer v6; // rbx\n  std::vector<int> *p_m_levels; // r15\n  size_t v8; // r14\n  int v9; // r13d\n  int *v10; // rbx\n  unsigned __int64 v11; // rbx\n  __int64 v12; // rcx\n  int v13[11]; // [rsp+0h] [rbp-2Ch] BYREF\n\n  v13[0] = HIDWORD(v3);\n  begin = a1->m_levels.__begin_;\n  end = a1->m_levels.__end_;\n  v6 = begin;\n  if ( begin != end )\n  {\n    v6 = a1->m_levels.__begin_;\n    while ( *v6 != a2 )\n    {\n      if ( ++v6 == end )\n        goto LABEL_14;\n    }\n  }\n  if ( v6 != end )\n  {\n    p_m_levels = &a1->m_levels;\n    v13[0] = *v6;\n    v8 = (char *)end - (char *)(v6 + 1);\n    if ( v8 )\n    {\n      v9 = a3;\n      memmove(v6, v6 + 1, v8);\n      a3 = v9;\n      begin = p_m_levels->__begin_;\n    }\n    v10 = (std::__vector_base<int>::pointer)((char *)v6 + v8);\n    a1->m_levels.__end_ = v10;\n    v11 = v10 - begin;\n    if ( v11 >= (unsigned int)a3 )\n      LODWORD(v11) = a3;\n    v12 = 0;\n    if ( a3 >= 0 )\n      v12 = (unsigned int)v11;\n    sub_100562C70(p_m_levels, &begin[v12], v13);\n  }\nLABEL_14:\n  GJLevelList::updateLevelsString(a1);\n}", "assembly": "; \n; GJLevelList::reorderLevel from 0x100562bb0 to 0x100562c6d (189 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::setIDPopupClosed @ 0x10035f9e7\n; > sub_10035FA50 @ 0x10035fa90\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, 0x100562bb0\nmov     rbp, rsp                                                       ; +0x1, 0x100562bb1\npush    r15                                                            ; +0x4, 0x100562bb4\npush    r14                                                            ; +0x6, 0x100562bb6\npush    r13                                                            ; +0x8, 0x100562bb8\npush    r12                                                            ; +0xa, 0x100562bba\npush    rbx                                                            ; +0xc, 0x100562bbc\npush    rax                                                            ; +0xd, 0x100562bbd\nmov     rax, [rdi+140h]                                                ; +0xe, 0x100562bbe\nmov     r14, [rdi+148h]                                                ; +0x15, 0x100562bc5\nmov     rbx, rax                                                       ; +0x1c, 0x100562bcc\ncmp     rax, r14                                                       ; +0x1f, 0x100562bcf\njz      short loc_100562BEF                                            ; +0x22, 0x100562bd2\nmov     rbx, rax                                                       ; +0x24, 0x100562bd4\nnop     word ptr [rax+rax+00000000h]                                   ; +0x27, 0x100562bd7\ncmp     [rbx], esi                                                     ; +0x30, 0x100562be0\njz      short loc_100562BEF                                            ; +0x32, 0x100562be2\nadd     rbx, 4                                                         ; +0x34, 0x100562be4\ncmp     rbx, r14                                                       ; +0x38, 0x100562be8\njnz     short loc_100562BE0                                            ; +0x3b, 0x100562beb\njmp     short loc_100562C59                                            ; +0x3d, 0x100562bed\ncmp     rbx, r14                                                       ; +0x3f, 0x100562bef\njz      short loc_100562C59                                            ; +0x42, 0x100562bf2\nlea     r15, [rdi+140h]                                                ; +0x44, 0x100562bf4\nmov     ecx, [rbx]                                                     ; +0x4b, 0x100562bfb\nmov     [rbp+var_2C], ecx                                              ; +0x4d, 0x100562bfd\nlea     rsi, [rbx+4]; __src                                            ; +0x50, 0x100562c00\nsub     r14, rsi                                                       ; +0x54, 0x100562c04\njz      short loc_100562C23                                            ; +0x57, 0x100562c07\nmov     r12, rdi                                                       ; +0x59, 0x100562c09\nmov     rdi, rbx; __dst                                                ; +0x5c, 0x100562c0c\nmov     r13d, edx                                                      ; +0x5f, 0x100562c0f\nmov     rdx, r14; __len                                                ; +0x62, 0x100562c12\ncall    _memmove                                                       ; +0x65, 0x100562c15\nmov     edx, r13d                                                      ; +0x6a, 0x100562c1a\nmov     rdi, r12                                                       ; +0x6d, 0x100562c1d\nmov     rax, [r15]                                                     ; +0x70, 0x100562c20\nadd     rbx, r14                                                       ; +0x73, 0x100562c23\nmov     [rdi+148h], rbx                                                ; +0x76, 0x100562c26\nmov     ecx, edx                                                       ; +0x7d, 0x100562c2d\nsub     rbx, rax                                                       ; +0x7f, 0x100562c2f\nsar     rbx, 2                                                         ; +0x82, 0x100562c32\ncmp     rbx, rcx                                                       ; +0x86, 0x100562c36\ncmovnb  ebx, edx                                                       ; +0x89, 0x100562c39\nxor     ecx, ecx                                                       ; +0x8c, 0x100562c3c\ntest    edx, edx                                                       ; +0x8e, 0x100562c3e\ncmovns  ecx, ebx                                                       ; +0x90, 0x100562c40\nlea     rsi, [rax+rcx*4]                                               ; +0x93, 0x100562c43\nlea     rdx, [rbp+var_2C]                                              ; +0x97, 0x100562c47\nmov     rbx, rdi                                                       ; +0x9b, 0x100562c4b\nmov     rdi, r15                                                       ; +0x9e, 0x100562c4e\ncall    sub_100562C70                                                  ; +0xa1, 0x100562c51\nmov     rdi, rbx                                                       ; +0xa6, 0x100562c56\ncall    GJLevelList__updateLevelsString                                ; +0xa9, 0x100562c59\nadd     rsp, 8                                                         ; +0xae, 0x100562c5e\npop     rbx                                                            ; +0xb2, 0x100562c62\npop     r12                                                            ; +0xb3, 0x100562c63\npop     r13                                                            ; +0xb5, 0x100562c65\npop     r14                                                            ; +0xb7, 0x100562c67\npop     r15                                                            ; +0xb9, 0x100562c69\npop     rbp                                                            ; +0xbb, 0x100562c6b\nretn                                                                   ; +0xbc, 0x100562c6c", "xrefs": ["LevelListLayer::setIDPopupClosed @ 0x10035f9e7", "sub_10035FA50 @ 0x10035fa90"], "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"}