{"type": "func", "start": 6443276336, "end": 6443276631, "name": "sub_1800C9830", "pseudocode": "// \n// sub_1800C9830 from 0x1800c9830 to 0x1800c9957 (295 bytes)\n// \n// 3 xrefs:\n// > sub_1800C9120 @ 0x1800c91cb\n// > sub_1800C9250 @ 0x1800c929b\n// > <???> @ 0x1801fe3c4\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_1800C9830(__int64 a1, __int64 a2, float a3)\n{\n  __int64 result; // rax\n  __int64 v6; // rax\n  int v7; // ecx\n  __int64 v8; // r8\n  float *v9; // r10\n  __int64 v10; // r11\n  float v11; // xmm0_4\n  float v12; // xmm3_4\n  __int64 v13; // rax\n  float v14; // xmm3_4\n  __int64 v15; // rax\n  char v16; // dl\n  float v17; // xmm3_4\n  int v18; // r8d\n  int v19; // eax\n\n  if ( !a2 )\n    return 31;\n  v6 = *(_QWORD *)(a1 + 24);\n  v7 = *(_DWORD *)(v6 + 72);\n  if ( (v7 & 2) != 0 )\n    a3 = 0.0;\n  if ( !*(_QWORD *)(a2 + 8) )\n    return 0;\n  v8 = *(int *)(a2 + 16);\n  v9 = *(float **)(v6 + 8 * v8 + 336);\n  if ( !v9 )\n    return 0;\n  v10 = *(_QWORD *)(v6 + 32);\n  v11 = (float)(*(float *)(v6 + 240) * *(float *)(v6 + 120)) + (float)(1.0 - *(float *)(v6 + 240));\n  v12 = (float)((float)((float)((float)(1.0 - *(float *)(v6 + 212)) * (float)(1.0 - *(float *)(v6 + 196)))\n                      * *(float *)(v10 + 500))\n              * *(float *)(v6 + 4 * v8 + 316))\n      * *(float *)(v6 + 536);\n  v13 = *(_QWORD *)(a1 + 40);\n  v14 = (float)(v12 * v11) * *(float *)(v10 + 492);\n  if ( v13 )\n  {\n    v15 = *(_QWORD *)(v13 + 280);\n    if ( v15 )\n      v14 = v14 * *(float *)(v15 + 120);\n  }\n  v16 = 0;\n  v17 = v14 * a3;\n  v18 = 64;\n  if ( (v7 & 0x200000) != 0 )\n  {\n    v16 = 1;\n  }\n  else if ( (*(_BYTE *)(v10 + 72) & 0x10) != 0 )\n  {\n    v18 = 0;\n  }\n  else\n  {\n    v19 = 64;\n    if ( (v7 & 0xC0020) != 0 )\n      v19 = 0;\n    v18 = v19;\n  }\n  result = sub_18005A4F0(v9, v17, v18, (*(_BYTE *)(a1 + 62) & 1) == 0, v16);\n  if ( !(_DWORD)result )\n    return 0;\n  return result;\n}", "assembly": "; \n; sub_1800C9830 from 0x1800c9830 to 0x1800c9957 (295 bytes)\n; \n; 3 xrefs:\n; > sub_1800C9120 @ 0x1800c91cb\n; > sub_1800C9250 @ 0x1800c929b\n; > <???> @ 0x1801fe3c4\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\nsub     rsp, 38h                                                       ; +0x0, 0x1800c9830\nmovaps  xmm4, xmm2                                                     ; +0x4, 0x1800c9834\nmov     r9, rcx                                                        ; +0x7, 0x1800c9837\ntest    rdx, rdx                                                       ; +0xa, 0x1800c983a\njnz     short loc_1800C9849                                            ; +0xd, 0x1800c983d\nmov     eax, 1Fh                                                       ; +0xf, 0x1800c983f\nadd     rsp, 38h                                                       ; +0x14, 0x1800c9844\nretn                                                                   ; +0x18, 0x1800c9848\nmov     rax, [rcx+18h]                                                 ; +0x19, 0x1800c9849\nmov     ecx, [rax+48h]                                                 ; +0x1d, 0x1800c984d\ntest    cl, 2                                                          ; +0x20, 0x1800c9850\njz      short loc_1800C9858                                            ; +0x23, 0x1800c9853\nxorps   xmm4, xmm4                                                     ; +0x25, 0x1800c9855\ncmp     qword ptr [rdx+8], 0                                           ; +0x28, 0x1800c9858\njz      loc_1800C9950                                                  ; +0x2d, 0x1800c985d\nmovsxd  r8, dword ptr [rdx+10h]                                        ; +0x33, 0x1800c9863\nmov     r10, [rax+r8*8+150h]                                           ; +0x37, 0x1800c9867\ntest    r10, r10                                                       ; +0x3f, 0x1800c986f\njz      loc_1800C9950                                                  ; +0x42, 0x1800c9872\nmovss   xmm2, cs:dword_180145744                                       ; +0x48, 0x1800c9878\nmov     r11, [rax+20h]                                                 ; +0x50, 0x1800c9880\nmovaps  xmm0, xmm2                                                     ; +0x54, 0x1800c9884\nsubss   xmm0, dword ptr [rax+0C4h]                                     ; +0x57, 0x1800c9887\nmovss   xmm1, dword ptr [rax+0F0h]                                     ; +0x5f, 0x1800c988f\nmovaps  xmm3, xmm2                                                     ; +0x67, 0x1800c9897\nsubss   xmm3, dword ptr [rax+0D4h]                                     ; +0x6a, 0x1800c989a\nsubss   xmm2, xmm1                                                     ; +0x72, 0x1800c98a2\nmulss   xmm3, xmm0                                                     ; +0x76, 0x1800c98a6\nmovaps  xmm0, xmm1                                                     ; +0x7a, 0x1800c98aa\nmulss   xmm0, dword ptr [rax+78h]                                      ; +0x7d, 0x1800c98ad\nmulss   xmm3, dword ptr [r11+1F4h]                                     ; +0x82, 0x1800c98b2\naddss   xmm0, xmm2                                                     ; +0x8b, 0x1800c98bb\nmulss   xmm3, dword ptr [rax+r8*4+13Ch]                                ; +0x8f, 0x1800c98bf\nmulss   xmm3, dword ptr [rax+218h]                                     ; +0x99, 0x1800c98c9\nmov     rax, [r9+28h]                                                  ; +0xa1, 0x1800c98d1\nmulss   xmm3, xmm0                                                     ; +0xa5, 0x1800c98d5\nmulss   xmm3, dword ptr [r11+1ECh]                                     ; +0xa9, 0x1800c98d9\ntest    rax, rax                                                       ; +0xb2, 0x1800c98e2\njz      short loc_1800C98F8                                            ; +0xb5, 0x1800c98e5\nmov     rax, [rax+118h]                                                ; +0xb7, 0x1800c98e7\ntest    rax, rax                                                       ; +0xbe, 0x1800c98ee\njz      short loc_1800C98F8                                            ; +0xc1, 0x1800c98f1\nmulss   xmm3, dword ptr [rax+78h]                                      ; +0xc3, 0x1800c98f3\nxor     dl, dl                                                         ; +0xc8, 0x1800c98f8\nmulss   xmm3, xmm4                                                     ; +0xca, 0x1800c98fa\nmov     r8d, 40h ; '@'                                                 ; +0xce, 0x1800c98fe\nbt      ecx, 15h                                                       ; +0xd4, 0x1800c9904\njnb     short loc_1800C990E                                            ; +0xd8, 0x1800c9908\nmov     dl, 1                                                          ; +0xda, 0x1800c990a\njmp     short loc_1800C9930                                            ; +0xdc, 0x1800c990c\ntest    byte ptr [r11+48h], 10h                                        ; +0xde, 0x1800c990e\njz      short loc_1800C991A                                            ; +0xe3, 0x1800c9913\nxor     r8d, r8d                                                       ; +0xe5, 0x1800c9915\njmp     short loc_1800C9930                                            ; +0xe8, 0x1800c9918\nmov     eax, r8d                                                       ; +0xea, 0x1800c991a\ntest    ecx, 0C0020h                                                   ; +0xed, 0x1800c991d\nmov     r8d, 0                                                         ; +0xf3, 0x1800c9923\ncmovnz  eax, r8d                                                       ; +0xf9, 0x1800c9929\nmov     r8d, eax                                                       ; +0xfd, 0x1800c992d\nmovzx   r9d, byte ptr [r9+3Eh]                                         ; +0x100, 0x1800c9930\nmovaps  xmm1, xmm3                                                     ; +0x105, 0x1800c9935\nxor     r9b, 0FFh                                                      ; +0x108, 0x1800c9938\nmov     [rsp+38h+var_18], dl                                           ; +0x10c, 0x1800c993c\nand     r9b, 1                                                         ; +0x110, 0x1800c9940\nmov     rcx, r10                                                       ; +0x114, 0x1800c9944\ncall    sub_18005A4F0                                                  ; +0x117, 0x1800c9947\ntest    eax, eax                                                       ; +0x11c, 0x1800c994c\njnz     short loc_1800C9952                                            ; +0x11e, 0x1800c994e\nxor     eax, eax                                                       ; +0x120, 0x1800c9950\nadd     rsp, 38h                                                       ; +0x122, 0x1800c9952\nretn                                                                   ; +0x126, 0x1800c9956", "xrefs": ["sub_1800C9120 @ 0x1800c91cb", "sub_1800C9250 @ 0x1800c929b", "<???> @ 0x1801fe3c4"], "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"}