{"type": "func", "start": 6442885632, "end": 6442885781, "name": "sub_18006A200", "pseudocode": "// \n// sub_18006A200 from 0x18006a200 to 0x18006a295 (149 bytes)\n// \n// 2 xrefs:\n// > sub_18006A810 @ 0x18006a93b\n// > <???> @ 0x1801acc48\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\nfloat __fastcall sub_18006A200(__int64 a1, float a2)\n{\n  int v2; // edx\n  __int64 v3; // rdx\n  float v4; // xmm1_4\n\n  v2 = (int)(float)(a2 * 32768.0);\n  if ( v2 < 0 )\n    v2 = -v2;\n  v3 = v2 & 0x7FFF;\n  if ( (unsigned int)v3 >> 13 )\n  {\n    switch ( (unsigned int)v3 >> 13 )\n    {\n      case 1u:\n        v4 = -*(float *)(a1 + 4 * (16692LL - (unsigned int)v3));\n        break;\n      case 2u:\n        v4 = -*(float *)(a1 + 4 * v3 - 64300);\n        break;\n      case 3u:\n        v4 = *(float *)(a1 + 4 * (33076LL - (unsigned int)v3));\n        break;\n      default:\n        v4 = 0.0;\n        break;\n    }\n  }\n  else\n  {\n    v4 = *(float *)(a1 + 4 * v3 + 1236);\n  }\n  return (float)(1.0 - v4) * 0.5;\n}", "assembly": "; \n; sub_18006A200 from 0x18006a200 to 0x18006a295 (149 bytes)\n; \n; 2 xrefs:\n; > sub_18006A810 @ 0x18006a93b\n; > <???> @ 0x1801acc48\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\nmulss   xmm1, cs:dword_180166F10                                       ; +0x0, 0x18006a200\nmov     r8, rcx                                                        ; +0x8, 0x18006a208\ncvttss2si edx, xmm1                                                    ; +0xb, 0x18006a20b\ntest    edx, edx                                                       ; +0xf, 0x18006a20f\njns     short loc_18006A215                                            ; +0x11, 0x18006a211\nneg     edx                                                            ; +0x13, 0x18006a213\nand     edx, 7FFFh                                                     ; +0x15, 0x18006a215\nmov     ecx, edx                                                       ; +0x1b, 0x18006a21b\nshr     ecx, 0Dh                                                       ; +0x1d, 0x18006a21d\ntest    ecx, ecx                                                       ; +0x20, 0x18006a220\njz      short loc_18006A276                                            ; +0x22, 0x18006a222\nsub     ecx, 1                                                         ; +0x24, 0x18006a224\njz      short loc_18006A25D                                            ; +0x27, 0x18006a227\nsub     ecx, 1                                                         ; +0x29, 0x18006a229\njz      short loc_18006A24A                                            ; +0x2c, 0x18006a22c\ncmp     ecx, 1                                                         ; +0x2e, 0x18006a22e\njz      short loc_18006A238                                            ; +0x31, 0x18006a231\nxorps   xmm1, xmm1                                                     ; +0x33, 0x18006a233\njmp     short loc_18006A280                                            ; +0x36, 0x18006a236\nmov     eax, edx                                                       ; +0x38, 0x18006a238\nmov     ecx, 8134h                                                     ; +0x3a, 0x18006a23a\nsub     rcx, rax                                                       ; +0x3f, 0x18006a23f\nmovss   xmm1, dword ptr [r8+rcx*4]                                     ; +0x42, 0x18006a242\njmp     short loc_18006A280                                            ; +0x48, 0x18006a248\nmovss   xmm1, dword ptr [r8+rdx*4-0FB2Ch]                              ; +0x4a, 0x18006a24a\nxorps   xmm1, cs:xmmword_180144610                                     ; +0x54, 0x18006a254\njmp     short loc_18006A280                                            ; +0x5b, 0x18006a25b\nmov     eax, edx                                                       ; +0x5d, 0x18006a25d\nmov     ecx, 4134h                                                     ; +0x5f, 0x18006a25f\nsub     rcx, rax                                                       ; +0x64, 0x18006a264\nmovss   xmm1, dword ptr [r8+rcx*4]                                     ; +0x67, 0x18006a267\nxorps   xmm1, cs:xmmword_180144610                                     ; +0x6d, 0x18006a26d\njmp     short loc_18006A280                                            ; +0x74, 0x18006a274\nmovss   xmm1, dword ptr [r8+rdx*4+4D4h]                                ; +0x76, 0x18006a276\nmovss   xmm0, cs:dword_180145744                                       ; +0x80, 0x18006a280\nsubss   xmm0, xmm1                                                     ; +0x88, 0x18006a288\nmulss   xmm0, cs:dword_18014573C                                       ; +0x8c, 0x18006a28c\nretn                                                                   ; +0x94, 0x18006a294", "xrefs": ["sub_18006A810 @ 0x18006a93b", "<???> @ 0x1801acc48"], "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"}