{"type": "func", "start": 6443372544, "end": 6443373217, "name": "sub_1800E1000", "pseudocode": "// \n// sub_1800E1000 from 0x1800e1000 to 0x1800e12a1 (673 bytes)\n// \n// 6 xrefs:\n// > sub_1800DF8E0 @ 0x1800dfa27\n// > sub_1800DFF40 @ 0x1800e066f\n// > <???> @ 0x18018cf7c\n// > <???> @ 0x18018cf90\n// > <???> @ 0x18018cfa0\n// > <???> @ 0x1801ff8f4\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\n__int64 __fastcall sub_1800E1000(__int64 a1, int a2, __int64 a3, char a4)\n{\n  char v4; // r12\n  __int64 v5; // rbp\n  char v10; // r15\n  __int64 v11; // rcx\n  __int64 v12; // rdx\n  _QWORD *v13; // rsi\n  __int64 v14; // rcx\n  bool v15; // zf\n  __int64 v16; // rcx\n  __int64 v17; // rax\n  __int64 v18; // rax\n  unsigned __int8 (**v19)(void); // rax\n  _OWORD v20[3]; // [rsp+20h] [rbp-88h] BYREF\n  __int64 v21; // [rsp+50h] [rbp-58h]\n  _OWORD v22[3]; // [rsp+58h] [rbp-50h] BYREF\n  __int64 v23; // [rsp+88h] [rbp-20h]\n\n  v4 = 0;\n  v5 = a2;\n  if ( a2 < 0 || a2 >= *(_DWORD *)(a1 + 176) )\n    return 31;\n  if ( a3 && *(_QWORD *)(a3 + 184) )\n    return 61;\n  if ( *(_QWORD *)(a1 + 168) )\n    return 62;\n  v10 = 0;\n  if ( (**(unsigned __int8 (***)(void))a1)() )\n  {\n    v11 = a1;\n    if ( *(_QWORD *)(a1 + 168) )\n    {\n      v11 = *(_QWORD *)(a1 + 168);\n      goto LABEL_13;\n    }\n    v12 = *(_QWORD *)(a1 + 160);\n    if ( !v12 || (v11 = *(_QWORD *)(v12 + 8LL * *(int *)(a1 + 192))) != 0 )\n    {\nLABEL_13:\n      if ( (*(_DWORD *)(v11 + 88) & 4) != 0 && (*(_DWORD *)(v11 + 88) & 8) == 0 )\n      {\n        v10 = 1;\n        sub_1801021C0(*(_QWORD *)(a1 + 216), 9);\n      }\n    }\n  }\n  if ( !a4 && (unsigned int)(*(_DWORD *)(a1 + 40) - 1) <= 4 )\n  {\n    v4 = 1;\n    sub_1801021C0(*(_QWORD *)(a1 + 216), 3);\n  }\n  v13 = *(_QWORD **)(8 * v5 + *(_QWORD *)(a1 + 160));\n  if ( v13 && v13[21] )\n  {\n    v21 = 0;\n    v14 = *(_QWORD *)(a1 + 96);\n    memset(v20, 0, sizeof(v20));\n    (*(void (__fastcall **)(__int64, _QWORD, _OWORD *))(v14 + 136))(v14, (unsigned int)v5, v20);\n  }\n  if ( a3 )\n  {\n    v15 = *(_QWORD *)(a3 + 168) == 0;\n    *(_DWORD *)(a3 + 192) = v5;\n    *(_QWORD *)(a3 + 184) = a1;\n    if ( !v15 )\n    {\n      v16 = *(_QWORD *)(a1 + 96);\n      v23 = 0;\n      v17 = *(_QWORD *)(a3 + 96);\n      memset(v22, 0, sizeof(v22));\n      (*(void (__fastcall **)(__int64, _QWORD, _OWORD *))(v17 + 136))(v16, (unsigned int)v5, v22);\n    }\n  }\n  if ( v13 )\n  {\n    if ( (**(unsigned __int8 (__fastcall ***)(__int64))a1)(a1) )\n    {\n      v18 = *(_QWORD *)(a1 + 384);\n      if ( v18 == v13[48] )\n        *(_QWORD *)(v18 + 184) = 0;\n    }\n    else if ( *(_QWORD *)(v13[23] + 96LL) == v13[12] )\n    {\n      v13[12] = 0;\n    }\n    v13[23] = 0;\n    if ( !a3 )\n      --*(_DWORD *)(a1 + 180);\n  }\n  else if ( a3 )\n  {\n    ++*(_DWORD *)(a1 + 180);\n  }\n  *(_QWORD *)(8 * v5 + *(_QWORD *)(a1 + 160)) = a3;\n  *(_DWORD *)(a1 + 80) = *(_DWORD *)(a1 + 68);\n  v19 = *(unsigned __int8 (***)(void))a1;\n  *(_DWORD *)(a1 + 76) = 0;\n  if ( ((unsigned __int8 (__fastcall *)(__int64))*v19)(a1) )\n    (*(void (__fastcall **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 136LL))(\n      *(_QWORD *)(a1 + 376),\n      0,\n      (unsigned int)(*(_DWORD *)(a1 + 68) - 1));\n  if ( v4 )\n    sub_180102300(*(_QWORD *)(a1 + 216), 3);\n  if ( (**(unsigned __int8 (__fastcall ***)(__int64))a1)(a1) )\n  {\n    if ( a3 )\n      _InterlockedOr((volatile signed __int32 *)(a1 + 88), 0x10u);\n    if ( v10 )\n      sub_180102300(*(_QWORD *)(a1 + 216), 9);\n  }\n  return 0;\n}", "assembly": "; \n; sub_1800E1000 from 0x1800e1000 to 0x1800e12a1 (673 bytes)\n; \n; 6 xrefs:\n; > sub_1800DF8E0 @ 0x1800dfa27\n; > sub_1800DFF40 @ 0x1800e066f\n; > <???> @ 0x18018cf7c\n; > <???> @ 0x18018cf90\n; > <???> @ 0x18018cfa0\n; > <???> @ 0x1801ff8f4\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, 0x1800e1000\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x1800e1005\npush    rsi                                                            ; +0xa, 0x1800e100a\npush    rdi                                                            ; +0xb, 0x1800e100b\npush    r12                                                            ; +0xc, 0x1800e100c\nsub     rsp, 90h                                                       ; +0xe, 0x1800e100e\nxor     r12b, r12b                                                     ; +0x15, 0x1800e1015\nmovsxd  rbp, edx                                                       ; +0x18, 0x1800e1018\nmovzx   esi, r9b                                                       ; +0x1b, 0x1800e101b\nmov     rdi, r8                                                        ; +0x1f, 0x1800e101f\nmov     rbx, rcx                                                       ; +0x22, 0x1800e1022\ntest    edx, edx                                                       ; +0x25, 0x1800e1025\njs      loc_1800E1284                                                  ; +0x27, 0x1800e1027\ncmp     ebp, [rcx+0B0h]                                                ; +0x2d, 0x1800e102d\njge     loc_1800E1284                                                  ; +0x33, 0x1800e1033\ntest    r8, r8                                                         ; +0x39, 0x1800e1039\njz      short loc_1800E1052                                            ; +0x3c, 0x1800e103c\ncmp     qword ptr [r8+0B8h], 0                                         ; +0x3e, 0x1800e103e\njz      short loc_1800E1052                                            ; +0x46, 0x1800e1046\nmov     eax, 3Dh ; '='                                                 ; +0x48, 0x1800e1048\njmp     loc_1800E1289                                                  ; +0x4d, 0x1800e104d\ncmp     qword ptr [rcx+0A8h], 0                                        ; +0x52, 0x1800e1052\njz      short loc_1800E1066                                            ; +0x5a, 0x1800e105a\nmov     eax, 3Eh ; '>'                                                 ; +0x5c, 0x1800e105c\njmp     loc_1800E1289                                                  ; +0x61, 0x1800e1061\nmov     rax, [rcx]                                                     ; +0x66, 0x1800e1066\nmov     [rsp+0A8h+arg_0], r14                                          ; +0x69, 0x1800e1069\nmov     [rsp+0A8h+arg_8], r15                                          ; +0x71, 0x1800e1071\nxor     r15b, r15b                                                     ; +0x79, 0x1800e1079\ncall    qword ptr [rax]                                                ; +0x7c, 0x1800e107c\ntest    al, al                                                         ; +0x7e, 0x1800e107e\njz      short loc_1800E10D6                                            ; +0x80, 0x1800e1080\nmov     rax, [rbx+0A8h]                                                ; +0x82, 0x1800e1082\nmov     rcx, rbx                                                       ; +0x89, 0x1800e1089\ntest    rax, rax                                                       ; +0x8c, 0x1800e108c\njz      short loc_1800E1096                                            ; +0x8f, 0x1800e108f\nmov     rcx, rax                                                       ; +0x91, 0x1800e1091\njmp     short loc_1800E10B2                                            ; +0x94, 0x1800e1094\nmov     rdx, [rbx+0A0h]                                                ; +0x96, 0x1800e1096\ntest    rdx, rdx                                                       ; +0x9d, 0x1800e109d\njz      short loc_1800E10B2                                            ; +0xa0, 0x1800e10a0\nmovsxd  rax, dword ptr [rbx+0C0h]                                      ; +0xa2, 0x1800e10a2\nmov     rcx, [rdx+rax*8]                                               ; +0xa9, 0x1800e10a9\ntest    rcx, rcx                                                       ; +0xad, 0x1800e10ad\njz      short loc_1800E10D6                                            ; +0xb0, 0x1800e10b0\nmov     eax, [rcx+58h]                                                 ; +0xb2, 0x1800e10b2\nnop                                                                    ; +0xb5, 0x1800e10b5\ntest    al, 4                                                          ; +0xb6, 0x1800e10b6\njz      short loc_1800E10D6                                            ; +0xb8, 0x1800e10b8\nmov     eax, [rcx+58h]                                                 ; +0xba, 0x1800e10ba\nnop                                                                    ; +0xbd, 0x1800e10bd\ntest    al, 8                                                          ; +0xbe, 0x1800e10be\njnz     short loc_1800E10D6                                            ; +0xc0, 0x1800e10c0\nmov     rcx, [rbx+0D8h]                                                ; +0xc2, 0x1800e10c2\nmov     edx, 9                                                         ; +0xc9, 0x1800e10c9\nmov     r15b, 1                                                        ; +0xce, 0x1800e10ce\ncall    sub_1801021C0                                                  ; +0xd1, 0x1800e10d1\ntest    sil, sil                                                       ; +0xd6, 0x1800e10d6\njnz     short loc_1800E10F9                                            ; +0xd9, 0x1800e10d9\nmov     eax, [rbx+28h]                                                 ; +0xdb, 0x1800e10db\ndec     eax                                                            ; +0xde, 0x1800e10de\ncmp     eax, 4                                                         ; +0xe0, 0x1800e10e0\nja      short loc_1800E10F9                                            ; +0xe3, 0x1800e10e3\nmov     rcx, [rbx+0D8h]                                                ; +0xe5, 0x1800e10e5\nmov     edx, 3                                                         ; +0xec, 0x1800e10ec\nmov     r12b, 1                                                        ; +0xf1, 0x1800e10f1\ncall    sub_1801021C0                                                  ; +0xf4, 0x1800e10f4\nmov     rax, [rbx+0A0h]                                                ; +0xf9, 0x1800e10f9\nlea     r14, ds:0[rbp*8]                                               ; +0x100, 0x1800e1100\nmov     rsi, [r14+rax]                                                 ; +0x108, 0x1800e1108\ntest    rsi, rsi                                                       ; +0x10c, 0x1800e110c\njz      short loc_1800E1148                                            ; +0x10f, 0x1800e110f\ncmp     qword ptr [rsi+0A8h], 0                                        ; +0x111, 0x1800e1111\njz      short loc_1800E1148                                            ; +0x119, 0x1800e1119\nxorps   xmm0, xmm0                                                     ; +0x11b, 0x1800e111b\nlea     r8, [rsp+0A8h+var_88]                                          ; +0x11e, 0x1800e111e\nxor     eax, eax                                                       ; +0x123, 0x1800e1123\nmov     edx, ebp                                                       ; +0x125, 0x1800e1125\nmov     [rsp+0A8h+var_58], rax                                         ; +0x127, 0x1800e1127\nmov     rax, [rbx+60h]                                                 ; +0x12c, 0x1800e112c\nmov     rcx, rax                                                       ; +0x130, 0x1800e1130\nmovups  [rsp+0A8h+var_88], xmm0                                        ; +0x133, 0x1800e1133\nmovups  [rsp+0A8h+var_78], xmm0                                        ; +0x138, 0x1800e1138\nmovups  [rsp+0A8h+var_68], xmm0                                        ; +0x13d, 0x1800e113d\ncall    qword ptr [rax+88h]                                            ; +0x142, 0x1800e1142\ntest    rdi, rdi                                                       ; +0x148, 0x1800e1148\njz      short loc_1800E1195                                            ; +0x14b, 0x1800e114b\ncmp     qword ptr [rdi+0A8h], 0                                        ; +0x14d, 0x1800e114d\nmov     [rdi+0C0h], ebp                                                ; +0x155, 0x1800e1155\nmov     [rdi+0B8h], rbx                                                ; +0x15b, 0x1800e115b\njz      short loc_1800E1195                                            ; +0x162, 0x1800e1162\nmov     rcx, [rbx+60h]                                                 ; +0x164, 0x1800e1164\nlea     r8, [rsp+0A8h+var_50]                                          ; +0x168, 0x1800e1168\nxorps   xmm0, xmm0                                                     ; +0x16d, 0x1800e116d\nxor     eax, eax                                                       ; +0x170, 0x1800e1170\nmov     [rsp+0A8h+var_20], rax                                         ; +0x172, 0x1800e1172\nmov     edx, ebp                                                       ; +0x17a, 0x1800e117a\nmov     rax, [rdi+60h]                                                 ; +0x17c, 0x1800e117c\nmovups  [rsp+0A8h+var_50], xmm0                                        ; +0x180, 0x1800e1180\nmovups  [rsp+0A8h+var_40], xmm0                                        ; +0x185, 0x1800e1185\nmovups  [rsp+0A8h+var_30], xmm0                                        ; +0x18a, 0x1800e118a\ncall    qword ptr [rax+88h]                                            ; +0x18f, 0x1800e118f\nxor     ebp, ebp                                                       ; +0x195, 0x1800e1195\ntest    rsi, rsi                                                       ; +0x197, 0x1800e1197\njz      short loc_1800E11EA                                            ; +0x19a, 0x1800e119a\nmov     rax, [rbx]                                                     ; +0x19c, 0x1800e119c\nmov     rcx, rbx                                                       ; +0x19f, 0x1800e119f\ncall    qword ptr [rax]                                                ; +0x1a2, 0x1800e11a2\ntest    al, al                                                         ; +0x1a4, 0x1800e11a4\njz      short loc_1800E11C1                                            ; +0x1a6, 0x1800e11a6\nmov     rax, [rbx+180h]                                                ; +0x1a8, 0x1800e11a8\ncmp     rax, [rsi+180h]                                                ; +0x1af, 0x1800e11af\njnz     short loc_1800E11D6                                            ; +0x1b6, 0x1800e11b6\nmov     [rax+0B8h], rbp                                                ; +0x1b8, 0x1800e11b8\njmp     short loc_1800E11D6                                            ; +0x1bf, 0x1800e11bf\nmov     rcx, [rsi+0B8h]                                                ; +0x1c1, 0x1800e11c1\nmov     rax, [rsi+60h]                                                 ; +0x1c8, 0x1800e11c8\ncmp     [rcx+60h], rax                                                 ; +0x1cc, 0x1800e11cc\njnz     short loc_1800E11D6                                            ; +0x1d0, 0x1800e11d0\nmov     [rsi+60h], rbp                                                 ; +0x1d2, 0x1800e11d2\nmov     [rsi+0B8h], rbp                                                ; +0x1d6, 0x1800e11d6\ntest    rdi, rdi                                                       ; +0x1dd, 0x1800e11dd\njnz     short loc_1800E11F5                                            ; +0x1e0, 0x1800e11e0\ndec     dword ptr [rbx+0B4h]                                           ; +0x1e2, 0x1800e11e2\njmp     short loc_1800E11F5                                            ; +0x1e8, 0x1800e11e8\ntest    rdi, rdi                                                       ; +0x1ea, 0x1800e11ea\njz      short loc_1800E11F5                                            ; +0x1ed, 0x1800e11ed\ninc     dword ptr [rbx+0B4h]                                           ; +0x1ef, 0x1800e11ef\nmov     rax, [rbx+0A0h]                                                ; +0x1f5, 0x1800e11f5\nmov     rcx, rbx                                                       ; +0x1fc, 0x1800e11fc\nmov     [r14+rax], rdi                                                 ; +0x1ff, 0x1800e11ff\nmov     eax, [rbx+44h]                                                 ; +0x203, 0x1800e1203\nmov     [rbx+50h], eax                                                 ; +0x206, 0x1800e1206\nmov     rax, [rbx]                                                     ; +0x209, 0x1800e1209\nmov     [rbx+4Ch], ebp                                                 ; +0x20c, 0x1800e120c\ncall    qword ptr [rax]                                                ; +0x20f, 0x1800e120f\nmov     r14, [rsp+0A8h+arg_0]                                          ; +0x211, 0x1800e1211\ntest    al, al                                                         ; +0x219, 0x1800e1219\njz      short loc_1800E1236                                            ; +0x21b, 0x1800e121b\nmov     rcx, [rbx+178h]                                                ; +0x21d, 0x1800e121d\nxor     edx, edx                                                       ; +0x224, 0x1800e1224\nmov     r8d, [rbx+44h]                                                 ; +0x226, 0x1800e1226\ndec     r8d                                                            ; +0x22a, 0x1800e122a\nmov     rax, [rcx]                                                     ; +0x22d, 0x1800e122d\ncall    qword ptr [rax+88h]                                            ; +0x230, 0x1800e1230\ntest    r12b, r12b                                                     ; +0x236, 0x1800e1236\njz      short loc_1800E124C                                            ; +0x239, 0x1800e1239\nmov     rcx, [rbx+0D8h]                                                ; +0x23b, 0x1800e123b\nmov     edx, 3                                                         ; +0x242, 0x1800e1242\ncall    sub_180102300                                                  ; +0x247, 0x1800e1247\nmov     rax, [rbx]                                                     ; +0x24c, 0x1800e124c\nmov     rcx, rbx                                                       ; +0x24f, 0x1800e124f\ncall    qword ptr [rax]                                                ; +0x252, 0x1800e1252\ntest    al, al                                                         ; +0x254, 0x1800e1254\njz      short loc_1800E1278                                            ; +0x256, 0x1800e1256\ntest    rdi, rdi                                                       ; +0x258, 0x1800e1258\njz      short loc_1800E1262                                            ; +0x25b, 0x1800e125b\nlock or dword ptr [rbx+58h], 10h                                       ; +0x25d, 0x1800e125d\ntest    r15b, r15b                                                     ; +0x262, 0x1800e1262\njz      short loc_1800E1278                                            ; +0x265, 0x1800e1265\nmov     rcx, [rbx+0D8h]                                                ; +0x267, 0x1800e1267\nmov     edx, 9                                                         ; +0x26e, 0x1800e126e\ncall    sub_180102300                                                  ; +0x273, 0x1800e1273\nmov     r15, [rsp+0A8h+arg_8]                                          ; +0x278, 0x1800e1278\nxor     eax, eax                                                       ; +0x280, 0x1800e1280\njmp     short loc_1800E1289                                            ; +0x282, 0x1800e1282\nmov     eax, 1Fh                                                       ; +0x284, 0x1800e1284\nlea     r11, [rsp+0A8h+var_18]                                         ; +0x289, 0x1800e1289\nmov     rbx, [r11+30h]                                                 ; +0x291, 0x1800e1291\nmov     rbp, [r11+38h]                                                 ; +0x295, 0x1800e1295\nmov     rsp, r11                                                       ; +0x299, 0x1800e1299\npop     r12                                                            ; +0x29c, 0x1800e129c\npop     rdi                                                            ; +0x29e, 0x1800e129e\npop     rsi                                                            ; +0x29f, 0x1800e129f\nretn                                                                   ; +0x2a0, 0x1800e12a0", "xrefs": ["sub_1800DF8E0 @ 0x1800dfa27", "sub_1800DFF40 @ 0x1800e066f", "<???> @ 0x18018cf7c", "<???> @ 0x18018cf90", "<???> @ 0x18018cfa0", "<???> @ 0x1801ff8f4"], "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"}