{"type": "func", "start": 6443417824, "end": 6443418212, "name": "sub_1800EC0E0", "pseudocode": "// \n// sub_1800EC0E0 from 0x1800ec0e0 to 0x1800ec264 (388 bytes)\n// \n// 5 xrefs:\n// > sub_18000F210 @ 0x18000f214\n// > sub_180058030 @ 0x180058037\n// > <???> @ 0x18018de90\n// > <???> @ 0x18018dea4\n// > <???> @ 0x1802001ac\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 10:54:19 +0000\n// \n\n__int64 __fastcall sub_1800EC0E0(__int16 *a1, void *a2, int *a3, int *a4, int a5)\n{\n  int v10; // ecx\n  int v11; // edx\n  const void *v12; // r9\n  int v13; // r15d\n  int v14; // r9d\n  int v15; // ebp\n  int v16; // ecx\n  __int64 v17; // rdx\n  __int64 v18; // r8\n  int v19; // xmm0_4\n  int v20; // eax\n  __int64 v21; // rax\n\n  if ( !a2 )\n  {\n    if ( a3 )\n    {\n      *a3 = a1[1];\n      if ( !a4 )\n        return 0;\n    }\n    else if ( !a4 )\n    {\n      return 31;\n    }\n    *a4 = *a1;\n    return 0;\n  }\n  if ( !a3 || !a4 )\n    return 31;\n  v10 = *a3;\n  if ( !*a3 )\n  {\n    v10 = a1[1];\n    *a3 = v10;\n  }\n  v11 = *a4;\n  if ( !*a4 )\n  {\n    v11 = *a1;\n    *a4 = v11;\n    v10 = *a3;\n  }\n  if ( v10 > 32 || v11 > 32 || v10 < 0 || v11 < 0 )\n    return 31;\n  v12 = *((const void **)a1 + 1);\n  v13 = v11;\n  if ( a5 )\n    v13 = a5;\n  if ( v12 && v10 == a1[1] && v13 == *a1 )\n  {\n    memmove(a2, v12, 4LL * v10 * v11);\n    return 0;\n  }\n  v14 = 0;\n  if ( v10 > 0 )\n  {\n    v15 = 0;\n    while ( 1 )\n    {\n      v16 = 0;\n      if ( *a4 > 0 )\n        break;\nLABEL_36:\n      ++v14;\n      v15 += v13;\n      if ( v14 >= *a3 )\n        return 0;\n    }\n    v17 = 0;\n    while ( 1 )\n    {\n      v18 = *((_QWORD *)a1 + 1);\n      if ( v18 )\n      {\n        if ( v14 >= a1[1] || (v20 = *a1, v16 >= v20) )\n        {\nLABEL_34:\n          v19 = 0;\n          goto LABEL_35;\n        }\n        v19 = *(_DWORD *)(v18 + 4LL * (v16 + v14 * v20));\n      }\n      else\n      {\n        if ( v17 != v14 )\n          goto LABEL_34;\n        v19 = 1065353216;\n      }\nLABEL_35:\n      v21 = v15 + v17;\n      ++v16;\n      ++v17;\n      *((_DWORD *)a2 + v21) = v19;\n      if ( v16 >= *a4 )\n        goto LABEL_36;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_1800EC0E0 from 0x1800ec0e0 to 0x1800ec264 (388 bytes)\n; \n; 5 xrefs:\n; > sub_18000F210 @ 0x18000f214\n; > sub_180058030 @ 0x180058037\n; > <???> @ 0x18018de90\n; > <???> @ 0x18018dea4\n; > <???> @ 0x1802001ac\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 10:54:19 +0000\n; \npush    rsi                                                            ; +0x0, 0x1800ec0e0\npush    r14                                                            ; +0x2, 0x1800ec0e2\nsub     rsp, 28h                                                       ; +0x4, 0x1800ec0e4\nmov     r11, r9                                                        ; +0x8, 0x1800ec0e8\nmov     r14, r8                                                        ; +0xb, 0x1800ec0eb\nmov     rsi, rdx                                                       ; +0xe, 0x1800ec0ee\nmov     r10, rcx                                                       ; +0x11, 0x1800ec0f1\ntest    rdx, rdx                                                       ; +0x14, 0x1800ec0f4\njnz     short loc_1800EC12C                                            ; +0x17, 0x1800ec0f7\ntest    r8, r8                                                         ; +0x19, 0x1800ec0f9\njnz     short loc_1800EC110                                            ; +0x1c, 0x1800ec0fc\ntest    r9, r9                                                         ; +0x1e, 0x1800ec0fe\njnz     short loc_1800EC11C                                            ; +0x21, 0x1800ec101\nmov     eax, 1Fh                                                       ; +0x23, 0x1800ec103\nadd     rsp, 28h                                                       ; +0x28, 0x1800ec108\npop     r14                                                            ; +0x2c, 0x1800ec10c\npop     rsi                                                            ; +0x2e, 0x1800ec10e\nretn                                                                   ; +0x2f, 0x1800ec10f\nmovsx   eax, word ptr [rcx+2]                                          ; +0x30, 0x1800ec110\nmov     [r8], eax                                                      ; +0x34, 0x1800ec114\ntest    r11, r11                                                       ; +0x37, 0x1800ec117\njz      short loc_1800EC122                                            ; +0x3a, 0x1800ec11a\nmovsx   eax, word ptr [rcx]                                            ; +0x3c, 0x1800ec11c\nmov     [r9], eax                                                      ; +0x3f, 0x1800ec11f\nxor     eax, eax                                                       ; +0x42, 0x1800ec122\nadd     rsp, 28h                                                       ; +0x44, 0x1800ec124\npop     r14                                                            ; +0x48, 0x1800ec128\npop     rsi                                                            ; +0x4a, 0x1800ec12a\nretn                                                                   ; +0x4b, 0x1800ec12b\ntest    r14, r14                                                       ; +0x4c, 0x1800ec12c\njz      short loc_1800EC103                                            ; +0x4f, 0x1800ec12f\ntest    r11, r11                                                       ; +0x51, 0x1800ec131\njz      short loc_1800EC103                                            ; +0x54, 0x1800ec134\nmov     ecx, [r8]                                                      ; +0x56, 0x1800ec136\ntest    ecx, ecx                                                       ; +0x59, 0x1800ec139\njnz     short loc_1800EC145                                            ; +0x5b, 0x1800ec13b\nmovsx   ecx, word ptr [r10+2]                                          ; +0x5d, 0x1800ec13d\nmov     [r8], ecx                                                      ; +0x62, 0x1800ec142\nmov     edx, [r9]                                                      ; +0x65, 0x1800ec145\ntest    edx, edx                                                       ; +0x68, 0x1800ec148\njnz     short loc_1800EC156                                            ; +0x6a, 0x1800ec14a\nmovsx   edx, word ptr [r10]                                            ; +0x6c, 0x1800ec14c\nmov     [r9], edx                                                      ; +0x70, 0x1800ec150\nmov     ecx, [r8]                                                      ; +0x73, 0x1800ec153\ncmp     ecx, 20h ; ' '                                                 ; +0x76, 0x1800ec156\njg      short loc_1800EC103                                            ; +0x79, 0x1800ec159\ncmp     edx, 20h ; ' '                                                 ; +0x7b, 0x1800ec15b\njg      short loc_1800EC103                                            ; +0x7e, 0x1800ec15e\ntest    ecx, ecx                                                       ; +0x80, 0x1800ec160\njs      short loc_1800EC103                                            ; +0x82, 0x1800ec162\ntest    edx, edx                                                       ; +0x84, 0x1800ec164\njs      short loc_1800EC103                                            ; +0x86, 0x1800ec166\nmov     eax, [rsp+38h+arg_20]                                          ; +0x88, 0x1800ec168\ntest    eax, eax                                                       ; +0x8c, 0x1800ec16c\nmov     r9, [r10+8]                                                    ; +0x8e, 0x1800ec16e\nmov     [rsp+38h+var_18], r15                                          ; +0x92, 0x1800ec172\nmov     r15d, edx                                                      ; +0x97, 0x1800ec177\ncmovnz  r15d, eax                                                      ; +0x9a, 0x1800ec17a\ntest    r9, r9                                                         ; +0x9e, 0x1800ec17e\njz      short loc_1800EC1B9                                            ; +0xa1, 0x1800ec181\nmovsx   eax, word ptr [r10+2]                                          ; +0xa3, 0x1800ec183\ncmp     ecx, eax                                                       ; +0xa8, 0x1800ec188\njnz     short loc_1800EC1B9                                            ; +0xaa, 0x1800ec18a\nmovsx   eax, word ptr [r10]                                            ; +0xac, 0x1800ec18c\ncmp     r15d, eax                                                      ; +0xb0, 0x1800ec190\njnz     short loc_1800EC1B9                                            ; +0xb3, 0x1800ec193\nimul    edx, ecx                                                       ; +0xb5, 0x1800ec195\nmov     rcx, rsi; void *                                               ; +0xb8, 0x1800ec198\nmovsxd  r8, edx                                                        ; +0xbb, 0x1800ec19b\nmov     rdx, r9; Src                                                   ; +0xbe, 0x1800ec19e\nshl     r8, 2; Size                                                    ; +0xc1, 0x1800ec1a1\ncall    memmove                                                        ; +0xc5, 0x1800ec1a5\nmov     r15, [rsp+38h+var_18]                                          ; +0xca, 0x1800ec1aa\nxor     eax, eax                                                       ; +0xcf, 0x1800ec1af\nadd     rsp, 28h                                                       ; +0xd1, 0x1800ec1b1\npop     r14                                                            ; +0xd5, 0x1800ec1b5\npop     rsi                                                            ; +0xd7, 0x1800ec1b7\nretn                                                                   ; +0xd8, 0x1800ec1b8\nxor     r9d, r9d                                                       ; +0xd9, 0x1800ec1b9\ntest    ecx, ecx                                                       ; +0xdc, 0x1800ec1bc\njle     loc_1800EC255                                                  ; +0xde, 0x1800ec1be\nmovss   xmm1, cs:dword_180145744                                       ; +0xe4, 0x1800ec1c4\nxorps   xmm2, xmm2                                                     ; +0xec, 0x1800ec1cc\nmov     [rsp+38h+arg_0], rbx                                           ; +0xef, 0x1800ec1cf\nmov     [rsp+38h+arg_8], rbp                                           ; +0xf4, 0x1800ec1d4\nxor     ebp, ebp                                                       ; +0xf9, 0x1800ec1d9\nmov     [rsp+38h+arg_10], rdi                                          ; +0xfb, 0x1800ec1db\nxor     ecx, ecx                                                       ; +0x100, 0x1800ec1e0\ncmp     [r11], ecx                                                     ; +0x102, 0x1800ec1e2\njle     short loc_1800EC23B                                            ; +0x105, 0x1800ec1e5\nmovsxd  rdi, ebp                                                       ; +0x107, 0x1800ec1e7\nxor     edx, edx                                                       ; +0x10a, 0x1800ec1ea\nmovsxd  rbx, r9d                                                       ; +0x10c, 0x1800ec1ec\nnop                                                                    ; +0x10f, 0x1800ec1ef\nmov     r8, [r10+8]                                                    ; +0x110, 0x1800ec1f0\ntest    r8, r8                                                         ; +0x114, 0x1800ec1f4\njnz     short loc_1800EC203                                            ; +0x117, 0x1800ec1f7\ncmp     rdx, rbx                                                       ; +0x119, 0x1800ec1f9\njnz     short loc_1800EC225                                            ; +0x11c, 0x1800ec1fc\nmovaps  xmm0, xmm1                                                     ; +0x11e, 0x1800ec1fe\njmp     short loc_1800EC228                                            ; +0x121, 0x1800ec201\nmovsx   eax, word ptr [r10+2]                                          ; +0x123, 0x1800ec203\ncmp     r9d, eax                                                       ; +0x128, 0x1800ec208\njge     short loc_1800EC225                                            ; +0x12b, 0x1800ec20b\nmovsx   eax, word ptr [r10]                                            ; +0x12d, 0x1800ec20d\ncmp     ecx, eax                                                       ; +0x131, 0x1800ec211\njge     short loc_1800EC225                                            ; +0x133, 0x1800ec213\nimul    eax, r9d                                                       ; +0x135, 0x1800ec215\nadd     eax, ecx                                                       ; +0x139, 0x1800ec219\ncdqe                                                                   ; +0x13b, 0x1800ec21b\nmovss   xmm0, dword ptr [r8+rax*4]                                     ; +0x13d, 0x1800ec21d\njmp     short loc_1800EC228                                            ; +0x143, 0x1800ec223\nmovaps  xmm0, xmm2                                                     ; +0x145, 0x1800ec225\nlea     rax, [rdi+rdx]                                                 ; +0x148, 0x1800ec228\ninc     ecx                                                            ; +0x14c, 0x1800ec22c\ninc     rdx                                                            ; +0x14e, 0x1800ec22e\nmovss   dword ptr [rsi+rax*4], xmm0                                    ; +0x151, 0x1800ec231\ncmp     ecx, [r11]                                                     ; +0x156, 0x1800ec236\njl      short loc_1800EC1F0                                            ; +0x159, 0x1800ec239\ninc     r9d                                                            ; +0x15b, 0x1800ec23b\nadd     ebp, r15d                                                      ; +0x15e, 0x1800ec23e\ncmp     r9d, [r14]                                                     ; +0x161, 0x1800ec241\njl      short loc_1800EC1E0                                            ; +0x164, 0x1800ec244\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x166, 0x1800ec246\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x16b, 0x1800ec24b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x170, 0x1800ec250\nmov     r15, [rsp+38h+var_18]                                          ; +0x175, 0x1800ec255\nxor     eax, eax                                                       ; +0x17a, 0x1800ec25a\nadd     rsp, 28h                                                       ; +0x17c, 0x1800ec25c\npop     r14                                                            ; +0x180, 0x1800ec260\npop     rsi                                                            ; +0x182, 0x1800ec262\nretn                                                                   ; +0x183, 0x1800ec263", "xrefs": ["sub_18000F210 @ 0x18000f214", "sub_180058030 @ 0x180058037", "<???> @ 0x18018de90", "<???> @ 0x18018dea4", "<???> @ 0x1802001ac"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}