{"type": "func", "start": 6443547760, "end": 6443548491, "name": "sub_18010BC70", "pseudocode": "// \n// sub_18010BC70 from 0x18010bc70 to 0x18010bf4b (731 bytes)\n// \n// 5 xrefs:\n// > sub_18010A590 @ 0x18010a593\n// > <???> @ 0x180190528\n// > <???> @ 0x18019053c\n// > <???> @ 0x18019054c\n// > <???> @ 0x180201868\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_18010BC70(__int64 a1, unsigned int a2, __int64 a3, __int64 a4, int a5, int a6)\n{\n  __int64 result; // rax\n  _QWORD *v10; // rdx\n  __int64 v11; // rcx\n  float v12; // xmm2_4\n  __int64 v13; // rdx\n  int v14; // edx\n  int v15; // r8d\n  int v16; // r9d\n  __int64 v17; // rax\n  float v18; // xmm0_4\n  float v19; // xmm0_4\n  __int64 v20; // [rsp+40h] [rbp-C0h] BYREF\n  __int64 v21; // [rsp+50h] [rbp-B0h] BYREF\n  _QWORD v22[3]; // [rsp+58h] [rbp-A8h] BYREF\n  _QWORD v23[3]; // [rsp+70h] [rbp-90h] BYREF\n  int v24; // [rsp+88h] [rbp-78h]\n  __int64 v25; // [rsp+90h] [rbp-70h]\n  int v26; // [rsp+98h] [rbp-68h]\n  __int64 v27; // [rsp+A0h] [rbp-60h]\n  __int64 v28; // [rsp+A8h] [rbp-58h]\n  __int64 v29; // [rsp+B0h] [rbp-50h]\n  int v30; // [rsp+E8h] [rbp-18h]\n  __int64 v31; // [rsp+F0h] [rbp-10h]\n\n  if ( a6 == 1 )\n  {\n    if ( !a5 )\n      return 0;\n    return 11;\n  }\n  v10 = *(_QWORD **)(a1 + 648);\n  v11 = *(_QWORD *)(a1 + 168);\n  v20 = 0;\n  result = sub_1800E62C0(v11, v10, &v20);\n  if ( !(_DWORD)result )\n  {\n    v12 = *(float *)(a1 + 636);\n    v13 = *(_QWORD *)(a1 + 168);\n    v22[1] = v22;\n    v22[0] = v22;\n    v23[1] = v23;\n    v23[0] = v23;\n    v22[2] = 0;\n    v23[2] = 0;\n    v25 = 0;\n    v24 = 0;\n    v27 = 0;\n    v26 = 0;\n    v31 = 0;\n    v30 = 0;\n    v21 = 0;\n    v28 = 0;\n    v29 = 0;\n    result = sub_1800580D0((__int64)&v21, v13, v12);\n    if ( !(_DWORD)result )\n    {\n      result = sub_180058150(\n                 (__int64)&v21,\n                 *(char **)(v20 + 80),\n                 **(_QWORD **)(a3 + 24),\n                 0,\n                 1,\n                 **(_DWORD **)(a3 + 8),\n                 a2,\n                 1);\n      if ( !(_DWORD)result )\n      {\n        if ( *(_BYTE *)(a1 + 656) )\n        {\n          v17 = v20;\n          *(_OWORD *)(v20 + 16) = 0;\n          *(_OWORD *)(v17 + 32) = 0;\n          *(_OWORD *)(v17 + 48) = 0;\n          sub_1800F9F70(*(_QWORD *)(a1 + 576), v14, v15, v16, 1.0, 1, v20 + 16);\n          *(_DWORD *)(v20 + 64) = *(_DWORD *)(a1 + 624);\n          *(_DWORD *)(v20 + 68) = *(_DWORD *)(a1 + 628);\n          *(_DWORD *)(v20 + 72) = *(_DWORD *)(a1 + 632);\n          *(_DWORD *)(v20 + 8) = *(_DWORD *)(a1 + 556);\n          *(float *)(v20 + 4) = fminf(*(float *)(a1 + 544), 1.0);\n          v18 = *(float *)(a1 + 628);\n          if ( v18 <= 0.0 )\n          {\n            *(float *)(v20 + 12) = (float)(1.0 - *(float *)(a1 + 544)) + 1.0;\n          }\n          else\n          {\n            v19 = atan2f(\n                    v18,\n                    fsqrt(\n                      (float)(*(float *)(a1 + 632) * *(float *)(a1 + 632))\n                    + (float)(*(float *)(a1 + 624) * *(float *)(a1 + 624))));\n            *(float *)(v20 + 12) = v19 * 0.63661975;\n            *(float *)(v20 + 12) = *(float *)(v20 + 12) * *(float *)(a1 + 544);\n            *(float *)(v20 + 12) = 1.0 - *(float *)(v20 + 12);\n          }\n          *(float *)(v20 + 12) = *(float *)(v20 + 12) * 0.5;\n          *(_BYTE *)(a1 + 656) = 0;\n        }\n        result = sub_1800E2D00();\n        if ( !(_DWORD)result )\n          return 11;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_18010BC70 from 0x18010bc70 to 0x18010bf4b (731 bytes)\n; \n; 5 xrefs:\n; > sub_18010A590 @ 0x18010a593\n; > <???> @ 0x180190528\n; > <???> @ 0x18019053c\n; > <???> @ 0x18019054c\n; > <???> @ 0x180201868\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-8+arg_0], rbx                                             ; +0x0, 0x18010bc70\nmov     [rsp-8+arg_8], rsi                                             ; +0x5, 0x18010bc75\nmov     [rsp-8+arg_10], rdi                                            ; +0xa, 0x18010bc7a\nmov     [rsp-8+arg_18], r14                                            ; +0xf, 0x18010bc7f\npush    rbp                                                            ; +0x14, 0x18010bc84\nlea     rbp, [rsp-20h]                                                 ; +0x15, 0x18010bc85\nsub     rsp, 120h                                                      ; +0x1a, 0x18010bc8a\ncmp     [rbp+20h+arg_28], 1                                            ; +0x21, 0x18010bc91\nmov     rdi, r8                                                        ; +0x25, 0x18010bc95\nmov     esi, edx                                                       ; +0x28, 0x18010bc98\nmov     rbx, rcx                                                       ; +0x2a, 0x18010bc9a\njnz     short loc_18010BCB0                                            ; +0x2d, 0x18010bc9d\ncmp     [rbp+20h+arg_20], 0                                            ; +0x2f, 0x18010bc9f\njnz     loc_18010BF29                                                  ; +0x33, 0x18010bca3\nxor     eax, eax                                                       ; +0x39, 0x18010bca9\njmp     loc_18010BF2E                                                  ; +0x3b, 0x18010bcab\nmov     rdx, [rcx+288h]                                                ; +0x40, 0x18010bcb0\nlea     r8, [rsp+120h+var_E0]                                          ; +0x47, 0x18010bcb7\nmov     rcx, [rcx+0A8h]                                                ; +0x4c, 0x18010bcbc\nxor     r14d, r14d                                                     ; +0x53, 0x18010bcc3\nmov     [rsp+120h+var_E0], r14                                         ; +0x56, 0x18010bcc6\ncall    sub_1800E62C0                                                  ; +0x5b, 0x18010bccb\ntest    eax, eax                                                       ; +0x60, 0x18010bcd0\njnz     loc_18010BF2E                                                  ; +0x62, 0x18010bcd2\nmovss   xmm2, dword ptr [rbx+27Ch]                                     ; +0x68, 0x18010bcd8\nlea     rax, [rsp+120h+var_C8]                                         ; +0x70, 0x18010bce0\nmov     rdx, [rbx+0A8h]                                                ; +0x75, 0x18010bce5\nlea     rcx, [rsp+120h+var_D0]                                         ; +0x7c, 0x18010bcec\nmov     [rsp+120h+var_C0], rax                                         ; +0x81, 0x18010bcf1\nlea     rax, [rsp+120h+var_C8]                                         ; +0x86, 0x18010bcf6\nmov     [rsp+120h+var_C8], rax                                         ; +0x8b, 0x18010bcfb\nlea     rax, [rsp+120h+var_B0]                                         ; +0x90, 0x18010bd00\nmov     [rsp+120h+var_A8], rax                                         ; +0x95, 0x18010bd05\nlea     rax, [rsp+120h+var_B0]                                         ; +0x9a, 0x18010bd0a\nmov     [rsp+120h+var_B0], rax                                         ; +0x9f, 0x18010bd0f\nmov     [rsp+120h+var_B8], r14                                         ; +0xa4, 0x18010bd14\nmov     [rbp+20h+var_A0], r14                                          ; +0xa9, 0x18010bd19\nmov     [rbp+20h+var_90], r14                                          ; +0xad, 0x18010bd1d\nmov     [rbp+20h+var_98], r14d                                         ; +0xb1, 0x18010bd21\nmov     [rbp+20h+var_80], r14                                          ; +0xb5, 0x18010bd25\nmov     [rbp+20h+var_88], r14d                                         ; +0xb9, 0x18010bd29\nmov     [rbp+20h+var_30], r14                                          ; +0xbd, 0x18010bd2d\nmov     [rbp+20h+var_38], r14d                                         ; +0xc1, 0x18010bd31\nmov     [rsp+120h+var_D0], r14                                         ; +0xc5, 0x18010bd35\nmov     [rbp+20h+var_78], r14                                          ; +0xca, 0x18010bd3a\nmov     [rbp+20h+var_70], r14                                          ; +0xce, 0x18010bd3e\ncall    sub_1800580D0                                                  ; +0xd2, 0x18010bd42\ntest    eax, eax                                                       ; +0xd7, 0x18010bd47\njnz     loc_18010BF2E                                                  ; +0xd9, 0x18010bd49\nmov     rax, [rdi+8]                                                   ; +0xdf, 0x18010bd4f\nlea     rcx, [rsp+120h+var_D0]                                         ; +0xe3, 0x18010bd53\nmov     r8, [rdi+18h]                                                  ; +0xe8, 0x18010bd58\nxor     r9d, r9d                                                       ; +0xec, 0x18010bd5c\nmov     rdx, [rsp+120h+var_E0]                                         ; +0xef, 0x18010bd5f\nmov     [rsp+120h+var_E8], 1                                           ; +0xf4, 0x18010bd64\nmov     eax, [rax]                                                     ; +0xfc, 0x18010bd6c\nmov     r8, [r8]                                                       ; +0xfe, 0x18010bd6e\nmov     rdx, [rdx+50h]                                                 ; +0x101, 0x18010bd71\nmov     dword ptr [rsp+120h+var_F0], esi                               ; +0x105, 0x18010bd75\nmov     [rsp+120h+var_F8], eax                                         ; +0x109, 0x18010bd79\nmov     [rsp+120h+var_100], 1                                          ; +0x10d, 0x18010bd7d\ncall    sub_180058150                                                  ; +0x115, 0x18010bd85\ntest    eax, eax                                                       ; +0x11a, 0x18010bd8a\njnz     loc_18010BF2E                                                  ; +0x11c, 0x18010bd8c\ncmp     [rbx+290h], r14b                                               ; +0x122, 0x18010bd92\njz      loc_18010BF0D                                                  ; +0x129, 0x18010bd99\nmov     rax, [rsp+120h+var_E0]                                         ; +0x12f, 0x18010bd9f\nxorps   xmm0, xmm0                                                     ; +0x134, 0x18010bda4\nmovaps  [rsp+120h+var_10], xmm6                                        ; +0x137, 0x18010bda7\nxorps   xmm3, xmm3                                                     ; +0x13f, 0x18010bdaf\nmovaps  [rsp+120h+var_20], xmm7                                        ; +0x142, 0x18010bdb2\nxorps   xmm6, xmm6                                                     ; +0x14a, 0x18010bdba\nmovss   xmm7, cs:dword_180145744                                       ; +0x14d, 0x18010bdbd\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x155, 0x18010bdc5\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x159, 0x18010bdc9\nmovups  xmmword ptr [rax+30h], xmm0                                    ; +0x15d, 0x18010bdcd\nmov     rax, [rsp+120h+var_E0]                                         ; +0x161, 0x18010bdd1\nmovss   xmm2, dword ptr [rbx+22Ch]                                     ; +0x166, 0x18010bdd6\nadd     rax, 10h                                                       ; +0x16e, 0x18010bdde\nmovss   xmm1, dword ptr [rbx+248h]                                     ; +0x172, 0x18010bde2\nmov     rcx, [rbx+240h]                                                ; +0x17a, 0x18010bdea\nmov     [rsp+120h+var_F0], rax                                         ; +0x181, 0x18010bdf1\nmov     [rsp+120h+var_F8], 1                                           ; +0x186, 0x18010bdf6\nmovss   [rsp+120h+var_100], xmm7                                       ; +0x18e, 0x18010bdfe\ncall    sub_1800F9F70                                                  ; +0x194, 0x18010be04\nmov     rax, [rsp+120h+var_E0]                                         ; +0x199, 0x18010be09\nmov     ecx, [rbx+270h]                                                ; +0x19e, 0x18010be0e\nmov     [rax+40h], ecx                                                 ; +0x1a4, 0x18010be14\nmov     rax, [rsp+120h+var_E0]                                         ; +0x1a7, 0x18010be17\nmov     ecx, [rbx+274h]                                                ; +0x1ac, 0x18010be1c\nmov     [rax+44h], ecx                                                 ; +0x1b2, 0x18010be22\nmov     rax, [rsp+120h+var_E0]                                         ; +0x1b5, 0x18010be25\nmov     ecx, [rbx+278h]                                                ; +0x1ba, 0x18010be2a\nmov     [rax+48h], ecx                                                 ; +0x1c0, 0x18010be30\nmov     rax, [rsp+120h+var_E0]                                         ; +0x1c3, 0x18010be33\nmov     ecx, [rbx+22Ch]                                                ; +0x1c8, 0x18010be38\nmov     [rax+8], ecx                                                   ; +0x1ce, 0x18010be3e\nmovss   xmm0, dword ptr [rbx+220h]                                     ; +0x1d1, 0x18010be41\nmov     rax, [rsp+120h+var_E0]                                         ; +0x1d9, 0x18010be49\nminss   xmm0, xmm7                                                     ; +0x1de, 0x18010be4e\nmovss   dword ptr [rax+4], xmm0                                        ; +0x1e2, 0x18010be52\nmovss   xmm0, dword ptr [rbx+274h]; Y                                  ; +0x1e7, 0x18010be57\ncomiss  xmm0, xmm6                                                     ; +0x1ef, 0x18010be5f\nmovaps  xmm6, [rsp+120h+var_10]                                        ; +0x1f2, 0x18010be62\njbe     short loc_18010BECE                                            ; +0x1fa, 0x18010be6a\nmovss   xmm1, dword ptr [rbx+270h]                                     ; +0x1fc, 0x18010be6c\nmovss   xmm2, dword ptr [rbx+278h]                                     ; +0x204, 0x18010be74\nmulss   xmm1, xmm1                                                     ; +0x20c, 0x18010be7c\nmulss   xmm2, xmm2                                                     ; +0x210, 0x18010be80\naddss   xmm2, xmm1                                                     ; +0x214, 0x18010be84\nxorps   xmm1, xmm1                                                     ; +0x218, 0x18010be88\nsqrtss  xmm1, xmm2; X                                                  ; +0x21b, 0x18010be8b\ncall    atan2f                                                         ; +0x21f, 0x18010be8f\nmov     rax, [rsp+120h+var_E0]                                         ; +0x224, 0x18010be94\nmulss   xmm0, cs:dword_18016F19C                                       ; +0x229, 0x18010be99\nmovss   dword ptr [rax+0Ch], xmm0                                      ; +0x231, 0x18010bea1\nmov     rax, [rsp+120h+var_E0]                                         ; +0x236, 0x18010bea6\nmovss   xmm0, dword ptr [rax+0Ch]                                      ; +0x23b, 0x18010beab\nmulss   xmm0, dword ptr [rbx+220h]                                     ; +0x240, 0x18010beb0\nmovss   dword ptr [rax+0Ch], xmm0                                      ; +0x248, 0x18010beb8\nmov     rax, [rsp+120h+var_E0]                                         ; +0x24d, 0x18010bebd\nsubss   xmm7, dword ptr [rax+0Ch]                                      ; +0x252, 0x18010bec2\nmovss   dword ptr [rax+0Ch], xmm7                                      ; +0x257, 0x18010bec7\njmp     short loc_18010BEE7                                            ; +0x25c, 0x18010becc\nmov     rax, [rsp+120h+var_E0]                                         ; +0x25e, 0x18010bece\nmovaps  xmm0, xmm7                                                     ; +0x263, 0x18010bed3\nsubss   xmm0, dword ptr [rbx+220h]                                     ; +0x266, 0x18010bed6\naddss   xmm0, xmm7                                                     ; +0x26e, 0x18010bede\nmovss   dword ptr [rax+0Ch], xmm0                                      ; +0x272, 0x18010bee2\nmov     rax, [rsp+120h+var_E0]                                         ; +0x277, 0x18010bee7\nmovaps  xmm7, [rsp+120h+var_20]                                        ; +0x27c, 0x18010beec\nmovss   xmm0, dword ptr [rax+0Ch]                                      ; +0x284, 0x18010bef4\nmulss   xmm0, cs:dword_18014573C                                       ; +0x289, 0x18010bef9\nmovss   dword ptr [rax+0Ch], xmm0                                      ; +0x291, 0x18010bf01\nmov     [rbx+290h], r14b                                               ; +0x296, 0x18010bf06\nmov     r8, [rsp+120h+var_E0]                                          ; +0x29d, 0x18010bf0d\nmov     rdx, [rbx+288h]                                                ; +0x2a2, 0x18010bf12\nmov     rcx, [rbx+0A8h]                                                ; +0x2a9, 0x18010bf19\ncall    sub_1800E2D00                                                  ; +0x2b0, 0x18010bf20\ntest    eax, eax                                                       ; +0x2b5, 0x18010bf25\njnz     short loc_18010BF2E                                            ; +0x2b7, 0x18010bf27\nmov     eax, 0Bh                                                       ; +0x2b9, 0x18010bf29\nlea     r11, [rsp+120h+var_s0]                                         ; +0x2be, 0x18010bf2e\nmov     rbx, [r11+10h]                                                 ; +0x2c6, 0x18010bf36\nmov     rsi, [r11+18h]                                                 ; +0x2ca, 0x18010bf3a\nmov     rdi, [r11+20h]                                                 ; +0x2ce, 0x18010bf3e\nmov     r14, [r11+28h]                                                 ; +0x2d2, 0x18010bf42\nmov     rsp, r11                                                       ; +0x2d6, 0x18010bf46\npop     rbp                                                            ; +0x2d9, 0x18010bf49\nretn                                                                   ; +0x2da, 0x18010bf4a", "xrefs": ["sub_18010A590 @ 0x18010a593", "<???> @ 0x180190528", "<???> @ 0x18019053c", "<???> @ 0x18019054c", "<???> @ 0x180201868"], "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"}