{"type": "func", "start": 6443418288, "end": 6443418611, "name": "sub_1800EC2B0", "pseudocode": "// \n// sub_1800EC2B0 from 0x1800ec2b0 to 0x1800ec3f3 (323 bytes)\n// \n// 9 xrefs:\n// > sub_180010470 @ 0x180010608\n// > sub_18005A650 @ 0x18005a8c2\n// > sub_18005A650 @ 0x18005a9ff\n// > sub_18005A650 @ 0x18005abe2\n// > sub_1800FC980 @ 0x1800fccc6\n// > sub_180108590 @ 0x18010893f\n// > <???> @ 0x18018de60\n// > <???> @ 0x18018de70\n// > <???> @ 0x1802001f4\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_1800EC2B0(__int16 *a1, char *a2, int a3, int a4, int a5)\n{\n  void *v6; // rcx\n  __int64 v7; // r15\n  int v9; // r14d\n  int v12; // edx\n  int v13; // r9d\n  int v14; // ebp\n  int v15; // ecx\n  int v16; // r8d\n  __int64 v17; // r11\n  char *v18; // rbx\n\n  v6 = *((void **)a1 + 1);\n  v7 = a4;\n  v9 = a4;\n  if ( a5 )\n    v9 = a5;\n  if ( !v6 )\n    return 30;\n  if ( !a2 )\n    return 31;\n  v12 = a1[1];\n  if ( a3 == v12 && v9 == a4 && v9 == *a1 )\n  {\n    memmove(v6, a2, 4LL * a4 * a3);\n    return 0;\n  }\n  else\n  {\n    v13 = 0;\n    if ( v12 > 0 )\n    {\n      v14 = 0;\n      do\n      {\n        LOWORD(v15) = *a1;\n        v16 = 0;\n        if ( *a1 > 0 )\n        {\n          v17 = 0;\n          v18 = &a2[4 * v14];\n          do\n          {\n            if ( v13 >= a3 || v17 >= v7 )\n              *(_DWORD *)(*((_QWORD *)a1 + 1) + 4LL * (v16 + v13 * (__int16)v15)) = 0;\n            else\n              *(_DWORD *)(*((_QWORD *)a1 + 1) + 4LL * (v16 + v13 * (__int16)v15)) = *(_DWORD *)v18;\n            v15 = *a1;\n            ++v16;\n            ++v17;\n            v18 += 4;\n          }\n          while ( v16 < v15 );\n        }\n        ++v13;\n        v14 += v9;\n      }\n      while ( v13 < a1[1] );\n    }\n    return 0;\n  }\n}", "assembly": "; \n; sub_1800EC2B0 from 0x1800ec2b0 to 0x1800ec3f3 (323 bytes)\n; \n; 9 xrefs:\n; > sub_180010470 @ 0x180010608\n; > sub_18005A650 @ 0x18005a8c2\n; > sub_18005A650 @ 0x18005a9ff\n; > sub_18005A650 @ 0x18005abe2\n; > sub_1800FC980 @ 0x1800fccc6\n; > sub_180108590 @ 0x18010893f\n; > <???> @ 0x18018de60\n; > <???> @ 0x18018de70\n; > <???> @ 0x1802001f4\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    rdi                                                            ; +0x0, 0x1800ec2b0\npush    r12                                                            ; +0x2, 0x1800ec2b2\npush    r14                                                            ; +0x4, 0x1800ec2b4\npush    r15                                                            ; +0x6, 0x1800ec2b6\nsub     rsp, 28h                                                       ; +0x8, 0x1800ec2b8\nmov     eax, [rsp+48h+arg_20]                                          ; +0xc, 0x1800ec2bc\nmov     r10, rcx                                                       ; +0x10, 0x1800ec2c0\nmov     rcx, [rcx+8]; void *                                           ; +0x13, 0x1800ec2c3\ntest    eax, eax                                                       ; +0x17, 0x1800ec2c7\nmovsxd  r15, r9d                                                       ; +0x19, 0x1800ec2c9\nmov     edi, r8d                                                       ; +0x1c, 0x1800ec2cc\nmov     r14d, r15d                                                     ; +0x1f, 0x1800ec2cf\nmov     r12, rdx                                                       ; +0x22, 0x1800ec2d2\ncmovnz  r14d, eax                                                      ; +0x25, 0x1800ec2d5\ntest    rcx, rcx                                                       ; +0x29, 0x1800ec2d9\njnz     short loc_1800EC2ED                                            ; +0x2c, 0x1800ec2dc\nlea     eax, [rcx+1Eh]                                                 ; +0x2e, 0x1800ec2de\nadd     rsp, 28h                                                       ; +0x31, 0x1800ec2e1\npop     r15                                                            ; +0x35, 0x1800ec2e5\npop     r14                                                            ; +0x37, 0x1800ec2e7\npop     r12                                                            ; +0x39, 0x1800ec2e9\npop     rdi                                                            ; +0x3b, 0x1800ec2eb\nretn                                                                   ; +0x3c, 0x1800ec2ec\ntest    r12, r12                                                       ; +0x3d, 0x1800ec2ed\njnz     short loc_1800EC303                                            ; +0x40, 0x1800ec2f0\nlea     eax, [r12+1Fh]                                                 ; +0x42, 0x1800ec2f2\nadd     rsp, 28h                                                       ; +0x47, 0x1800ec2f7\npop     r15                                                            ; +0x4b, 0x1800ec2fb\npop     r14                                                            ; +0x4d, 0x1800ec2fd\npop     r12                                                            ; +0x4f, 0x1800ec2ff\npop     rdi                                                            ; +0x51, 0x1800ec301\nretn                                                                   ; +0x52, 0x1800ec302\nmovsx   edx, word ptr [r10+2]                                          ; +0x53, 0x1800ec303\ncmp     edi, edx                                                       ; +0x58, 0x1800ec308\njnz     short loc_1800EC33B                                            ; +0x5a, 0x1800ec30a\ncmp     r14d, r15d                                                     ; +0x5c, 0x1800ec30c\njnz     short loc_1800EC33B                                            ; +0x5f, 0x1800ec30f\nmovsx   eax, word ptr [r10]                                            ; +0x61, 0x1800ec311\ncmp     r14d, eax                                                      ; +0x65, 0x1800ec315\njnz     short loc_1800EC33B                                            ; +0x68, 0x1800ec318\nimul    edi, r15d                                                      ; +0x6a, 0x1800ec31a\nmov     rdx, r12; Src                                                  ; +0x6e, 0x1800ec31e\nmovsxd  r8, edi                                                        ; +0x71, 0x1800ec321\nshl     r8, 2; Size                                                    ; +0x74, 0x1800ec324\ncall    memmove                                                        ; +0x78, 0x1800ec328\nxor     eax, eax                                                       ; +0x7d, 0x1800ec32d\nadd     rsp, 28h                                                       ; +0x7f, 0x1800ec32f\npop     r15                                                            ; +0x83, 0x1800ec333\npop     r14                                                            ; +0x85, 0x1800ec335\npop     r12                                                            ; +0x87, 0x1800ec337\npop     rdi                                                            ; +0x89, 0x1800ec339\nretn                                                                   ; +0x8a, 0x1800ec33a\nmov     [rsp+48h+var_28], r13                                          ; +0x8b, 0x1800ec33b\nxor     r13d, r13d                                                     ; +0x90, 0x1800ec340\nmov     r9d, r13d                                                      ; +0x93, 0x1800ec343\ntest    edx, edx                                                       ; +0x96, 0x1800ec346\njle     loc_1800EC3E0                                                  ; +0x98, 0x1800ec348\nmov     [rsp+48h+arg_0], rbx                                           ; +0x9e, 0x1800ec34e\nmov     [rsp+48h+arg_8], rbp                                           ; +0xa3, 0x1800ec353\nmov     ebp, r13d                                                      ; +0xa8, 0x1800ec358\nmov     [rsp+48h+arg_10], rsi                                          ; +0xab, 0x1800ec35b\nmovzx   ecx, word ptr [r10]                                            ; +0xb0, 0x1800ec360\nmov     r8d, r13d                                                      ; +0xb4, 0x1800ec364\ncmp     r13w, cx                                                       ; +0xb7, 0x1800ec367\njge     short loc_1800EC3C1                                            ; +0xbb, 0x1800ec36b\nmovsxd  rax, ebp                                                       ; +0xbd, 0x1800ec36d\nmov     r11, r13                                                       ; +0xc0, 0x1800ec370\nlea     rbx, [r12+rax*4]                                               ; +0xc3, 0x1800ec373\ncmp     r9d, edi                                                       ; +0xc7, 0x1800ec377\njge     short loc_1800EC399                                            ; +0xca, 0x1800ec37a\ncmp     r11, r15                                                       ; +0xcc, 0x1800ec37c\njge     short loc_1800EC399                                            ; +0xcf, 0x1800ec37f\nmovsx   eax, cx                                                        ; +0xd1, 0x1800ec381\nmov     rcx, [r10+8]                                                   ; +0xd4, 0x1800ec384\nimul    eax, r9d                                                       ; +0xd8, 0x1800ec388\nadd     eax, r8d                                                       ; +0xdc, 0x1800ec38c\nmovsxd  rdx, eax                                                       ; +0xdf, 0x1800ec38f\nmov     eax, [rbx]                                                     ; +0xe2, 0x1800ec392\nmov     [rcx+rdx*4], eax                                               ; +0xe4, 0x1800ec394\njmp     short loc_1800EC3AE                                            ; +0xe7, 0x1800ec397\nmovsx   eax, cx                                                        ; +0xe9, 0x1800ec399\nimul    eax, r9d                                                       ; +0xec, 0x1800ec39c\nadd     eax, r8d                                                       ; +0xf0, 0x1800ec3a0\nmovsxd  rcx, eax                                                       ; +0xf3, 0x1800ec3a3\nmov     rax, [r10+8]                                                   ; +0xf6, 0x1800ec3a6\nmov     [rax+rcx*4], r13d                                              ; +0xfa, 0x1800ec3aa\nmovsx   ecx, word ptr [r10]                                            ; +0xfe, 0x1800ec3ae\ninc     r8d                                                            ; +0x102, 0x1800ec3b2\ninc     r11                                                            ; +0x105, 0x1800ec3b5\nadd     rbx, 4                                                         ; +0x108, 0x1800ec3b8\ncmp     r8d, ecx                                                       ; +0x10c, 0x1800ec3bc\njl      short loc_1800EC377                                            ; +0x10f, 0x1800ec3bf\nmovsx   eax, word ptr [r10+2]                                          ; +0x111, 0x1800ec3c1\ninc     r9d                                                            ; +0x116, 0x1800ec3c6\nadd     ebp, r14d                                                      ; +0x119, 0x1800ec3c9\ncmp     r9d, eax                                                       ; +0x11c, 0x1800ec3cc\njl      short loc_1800EC360                                            ; +0x11f, 0x1800ec3cf\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x121, 0x1800ec3d1\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x126, 0x1800ec3d6\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x12b, 0x1800ec3db\nmov     r13, [rsp+48h+var_28]                                          ; +0x130, 0x1800ec3e0\nxor     eax, eax                                                       ; +0x135, 0x1800ec3e5\nadd     rsp, 28h                                                       ; +0x137, 0x1800ec3e7\npop     r15                                                            ; +0x13b, 0x1800ec3eb\npop     r14                                                            ; +0x13d, 0x1800ec3ed\npop     r12                                                            ; +0x13f, 0x1800ec3ef\npop     rdi                                                            ; +0x141, 0x1800ec3f1\nretn                                                                   ; +0x142, 0x1800ec3f2", "xrefs": ["sub_180010470 @ 0x180010608", "sub_18005A650 @ 0x18005a8c2", "sub_18005A650 @ 0x18005a9ff", "sub_18005A650 @ 0x18005abe2", "sub_1800FC980 @ 0x1800fccc6", "sub_180108590 @ 0x18010893f", "<???> @ 0x18018de60", "<???> @ 0x18018de70", "<???> @ 0x1802001f4"], "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"}