{"type": "func", "start": 6443423424, "end": 6443423791, "name": "sub_1800ED6C0", "pseudocode": "// \n// sub_1800ED6C0 from 0x1800ed6c0 to 0x1800ed82f (367 bytes)\n// \n// 3 xrefs:\n// > sub_1800ED830 @ 0x1800edaea\n// > sub_1800ED830 @ 0x1800edc47\n// > <???> @ 0x180200338\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:20 +0000\n// \n\n__int64 __fastcall sub_1800ED6C0(float a1, __int64 *a2, float *a3, float a4)\n{\n  float v7; // xmm0_4\n  int v8; // r9d\n  int v9; // r11d\n  int v10; // r8d\n  __int64 v11; // r10\n  __int64 v12; // rbx\n  float v13; // xmm0_4\n  int v14; // ecx\n  int v15; // eax\n  int v16; // ecx\n  signed int v17; // eax\n  __m128i v18; // xmm0\n  int v19; // eax\n  __int64 v20; // rdx\n\n  if ( a4 > -80.691002 )\n    v7 = powf(10.0, (float)(a4 * 0.1) + 0.0691);\n  else\n    v7 = 0.0;\n  if ( a1 >= v7 )\n  {\n    v8 = 0;\n    *a3 = a1 + *a3;\n    v9 = *((_DWORD *)a2 + 2);\n    v10 = v9 - 1;\n    if ( v9 - 1 < 0 )\n    {\nLABEL_16:\n      LODWORD(v12) = v8;\n    }\n    else\n    {\n      v11 = *a2;\n      while ( a1 <= *(float *)(v11 + 4LL * v10) )\n      {\n        v12 = (v10 + v8) / 2;\n        v13 = *(float *)(v11 + 4 * v12);\n        if ( v13 >= a1 )\n        {\n          v14 = v13 > a1;\n          if ( v13 <= a1 )\n            goto LABEL_17;\n        }\n        else\n        {\n          v14 = -1;\n        }\n        v15 = v12 - 1;\n        if ( v14 <= 0 )\n          v15 = v10;\n        v10 = v15;\n        if ( v14 <= 0 )\n          v8 = v12 + 1;\n        if ( v8 > v15 )\n          goto LABEL_16;\n      }\n      LODWORD(v12) = v10 + 1;\n    }\nLABEL_17:\n    if ( (int)v12 >= 0 && (int)v12 <= v9 )\n    {\n      v16 = v9 + 1;\n      v17 = abs32(*((_DWORD *)a2 + 3));\n      if ( v9 + 1 <= v17 )\n        goto LABEL_28;\n      v18 = _mm_cvtsi32_si128(v17);\n      v19 = v9 + 1;\n      v20 = (unsigned int)(int)(float)(_mm_cvtepi32_ps(v18).m128_f32[0] * 1.5);\n      if ( v16 <= (int)v20 )\n        v19 = v20;\n      if ( v19 >= 16 )\n      {\n        if ( v16 > (int)v20 )\n          v20 = (unsigned int)v16;\n      }\n      else\n      {\n        v20 = 16;\n      }\n      if ( !(unsigned int)sub_1800EE430(a2, v20) )\n      {\nLABEL_28:\n        if ( *((_DWORD *)a2 + 2) - (int)v12 > 0 )\n          memmove(\n            (void *)(*a2 + 4LL * (int)v12 + 4),\n            (const void *)(*a2 + 4LL * (int)v12),\n            4LL * (*((_DWORD *)a2 + 2) - (int)v12));\n        *(float *)(*a2 + 4LL * (int)v12) = a1;\n        ++*((_DWORD *)a2 + 2);\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_1800ED6C0 from 0x1800ed6c0 to 0x1800ed82f (367 bytes)\n; \n; 3 xrefs:\n; > sub_1800ED830 @ 0x1800edaea\n; > sub_1800ED830 @ 0x1800edc47\n; > <???> @ 0x180200338\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:20 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800ed6c0\nmovss   [rsp+arg_0], xmm0                                              ; +0x5, 0x1800ed6c5\npush    rdi                                                            ; +0xb, 0x1800ed6cb\nsub     rsp, 30h                                                       ; +0xc, 0x1800ed6cc\ncomiss  xmm3, cs:dword_18016DD6C                                       ; +0x10, 0x1800ed6d0\nmov     rbx, r8                                                        ; +0x17, 0x1800ed6d7\nmov     rdi, rdx                                                       ; +0x1a, 0x1800ed6da\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x1d, 0x1800ed6dd\nmovaps  xmm6, xmm0                                                     ; +0x22, 0x1800ed6e2\nja      short loc_1800ED6EC                                            ; +0x25, 0x1800ed6e5\nxorps   xmm0, xmm0                                                     ; +0x27, 0x1800ed6e7\njmp     short loc_1800ED70C                                            ; +0x2a, 0x1800ed6ea\nmulss   xmm3, cs:dword_1801674AC                                       ; +0x2c, 0x1800ed6ec\nmovss   xmm0, cs:flt_180145764; X                                      ; +0x34, 0x1800ed6f4\naddss   xmm3, cs:dword_18016DD30                                       ; +0x3c, 0x1800ed6fc\nmovaps  xmm1, xmm3; Y                                                  ; +0x44, 0x1800ed704\ncall    powf                                                           ; +0x47, 0x1800ed707\ncomiss  xmm6, xmm0                                                     ; +0x4c, 0x1800ed70c\njb      loc_1800ED81D                                                  ; +0x4f, 0x1800ed70f\nmovaps  xmm0, xmm6                                                     ; +0x55, 0x1800ed715\nxor     r9d, r9d                                                       ; +0x58, 0x1800ed718\naddss   xmm0, dword ptr [rbx]                                          ; +0x5b, 0x1800ed71b\nmovss   dword ptr [rbx], xmm0                                          ; +0x5f, 0x1800ed71f\nmov     r11d, [rdi+8]                                                  ; +0x63, 0x1800ed723\nlea     r8d, [r11-1]                                                   ; +0x67, 0x1800ed727\ntest    r8d, r8d                                                       ; +0x6b, 0x1800ed72b\njs      short loc_1800ED790                                            ; +0x6e, 0x1800ed72e\nmov     r10, [rdi]                                                     ; +0x70, 0x1800ed730\nnop     dword ptr [rax+00h]                                            ; +0x73, 0x1800ed733\nnop     word ptr [rax+rax+00000000h]                                   ; +0x77, 0x1800ed737\nmovsxd  rax, r8d                                                       ; +0x80, 0x1800ed740\ncomiss  xmm6, dword ptr [r10+rax*4]                                    ; +0x83, 0x1800ed743\nja      loc_1800ED7D6                                                  ; +0x88, 0x1800ed748\nlea     eax, [r8+r9]                                                   ; +0x8e, 0x1800ed74e\ncdq                                                                    ; +0x92, 0x1800ed752\nsub     eax, edx                                                       ; +0x93, 0x1800ed753\nsar     eax, 1                                                         ; +0x95, 0x1800ed755\nmovsxd  rbx, eax                                                       ; +0x97, 0x1800ed757\nmovss   xmm0, dword ptr [r10+rbx*4]                                    ; +0x9a, 0x1800ed75a\ncomiss  xmm0, xmm6                                                     ; +0xa0, 0x1800ed760\njnb     short loc_1800ED76C                                            ; +0xa3, 0x1800ed763\nmov     ecx, 0FFFFFFFFh                                                ; +0xa5, 0x1800ed765\njmp     short loc_1800ED778                                            ; +0xaa, 0x1800ed76a\nxor     ecx, ecx                                                       ; +0xac, 0x1800ed76c\ncomiss  xmm0, xmm6                                                     ; +0xae, 0x1800ed76e\nsetnbe  cl                                                             ; +0xb1, 0x1800ed771\ntest    ecx, ecx                                                       ; +0xb4, 0x1800ed774\njz      short loc_1800ED793                                            ; +0xb6, 0x1800ed776\ntest    ecx, ecx                                                       ; +0xb8, 0x1800ed778\nlea     eax, [rbx-1]                                                   ; +0xba, 0x1800ed77a\ncmovle  eax, r8d                                                       ; +0xbd, 0x1800ed77d\nmov     r8d, eax                                                       ; +0xc1, 0x1800ed781\nlea     eax, [rbx+1]                                                   ; +0xc4, 0x1800ed784\ncmovle  r9d, eax                                                       ; +0xc7, 0x1800ed787\ncmp     r9d, r8d                                                       ; +0xcb, 0x1800ed78b\njle     short loc_1800ED740                                            ; +0xce, 0x1800ed78e\nmov     ebx, r9d                                                       ; +0xd0, 0x1800ed790\ntest    ebx, ebx                                                       ; +0xd3, 0x1800ed793\njs      loc_1800ED81D                                                  ; +0xd5, 0x1800ed795\ncmp     ebx, r11d                                                      ; +0xdb, 0x1800ed79b\njg      short loc_1800ED81D                                            ; +0xde, 0x1800ed79e\nmov     eax, [rdi+0Ch]                                                 ; +0xe0, 0x1800ed7a0\nlea     ecx, [r11+1]                                                   ; +0xe3, 0x1800ed7a3\ncdq                                                                    ; +0xe7, 0x1800ed7a7\nxor     eax, edx                                                       ; +0xe8, 0x1800ed7a8\nsub     eax, edx                                                       ; +0xea, 0x1800ed7aa\ncmp     ecx, eax                                                       ; +0xec, 0x1800ed7ac\njle     short loc_1800ED7ED                                            ; +0xee, 0x1800ed7ae\nmovd    xmm0, eax                                                      ; +0xf0, 0x1800ed7b0\nmov     eax, ecx                                                       ; +0xf4, 0x1800ed7b4\ncvtdq2ps xmm0, xmm0                                                    ; +0xf6, 0x1800ed7b6\nmulss   xmm0, cs:dword_180169168                                       ; +0xf9, 0x1800ed7b9\ncvttss2si edx, xmm0                                                    ; +0x101, 0x1800ed7c1\ncmp     ecx, edx                                                       ; +0x105, 0x1800ed7c5\ncmovle  eax, edx                                                       ; +0x107, 0x1800ed7c7\ncmp     eax, 10h                                                       ; +0x10a, 0x1800ed7ca\njge     short loc_1800ED7DC                                            ; +0x10d, 0x1800ed7cd\nmov     edx, 10h                                                       ; +0x10f, 0x1800ed7cf\njmp     short loc_1800ED7E1                                            ; +0x114, 0x1800ed7d4\nlea     ebx, [r8+1]                                                    ; +0x116, 0x1800ed7d6\njmp     short loc_1800ED793                                            ; +0x11a, 0x1800ed7da\ncmp     ecx, edx                                                       ; +0x11c, 0x1800ed7dc\ncmovg   edx, ecx                                                       ; +0x11e, 0x1800ed7de\nmov     rcx, rdi                                                       ; +0x121, 0x1800ed7e1\ncall    sub_1800EE430                                                  ; +0x124, 0x1800ed7e4\ntest    eax, eax                                                       ; +0x129, 0x1800ed7e9\njnz     short loc_1800ED81D                                            ; +0x12b, 0x1800ed7eb\nmov     ecx, [rdi+8]                                                   ; +0x12d, 0x1800ed7ed\nsub     ecx, ebx                                                       ; +0x130, 0x1800ed7f0\nmovsxd  rbx, ebx                                                       ; +0x132, 0x1800ed7f2\ntest    ecx, ecx                                                       ; +0x135, 0x1800ed7f5\njle     short loc_1800ED810                                            ; +0x137, 0x1800ed7f7\nmov     rax, [rdi]                                                     ; +0x139, 0x1800ed7f9\nmovsxd  r8, ecx                                                        ; +0x13c, 0x1800ed7fc\nshl     r8, 2; Size                                                    ; +0x13f, 0x1800ed7ff\nlea     rdx, [rax+rbx*4]; Src                                          ; +0x143, 0x1800ed803\nlea     rcx, [rdx+4]; void *                                           ; +0x147, 0x1800ed807\ncall    memmove                                                        ; +0x14b, 0x1800ed80b\nmov     rcx, [rdi]                                                     ; +0x150, 0x1800ed810\nmov     eax, [rsp+38h+arg_0]                                           ; +0x153, 0x1800ed813\nmov     [rcx+rbx*4], eax                                               ; +0x157, 0x1800ed817\ninc     dword ptr [rdi+8]                                              ; +0x15a, 0x1800ed81a\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x15d, 0x1800ed81d\nxor     eax, eax                                                       ; +0x162, 0x1800ed822\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x164, 0x1800ed824\nadd     rsp, 30h                                                       ; +0x169, 0x1800ed829\npop     rdi                                                            ; +0x16d, 0x1800ed82d\nretn                                                                   ; +0x16e, 0x1800ed82e", "xrefs": ["sub_1800ED830 @ 0x1800edaea", "sub_1800ED830 @ 0x1800edc47", "<???> @ 0x180200338"], "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"}