{"type": "func", "start": 6442885472, "end": 6442885621, "name": "sub_18006A160", "pseudocode": "// \n// sub_18006A160 from 0x18006a160 to 0x18006a1f5 (149 bytes)\n// \n// 2 xrefs:\n// > sub_18006A810 @ 0x18006a93b\n// > <???> @ 0x1801acc48\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:53:27 +0000\n// \n\nfloat __fastcall sub_18006A160(__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 0.54000002 - (float)(v4 * 0.46000001);\n}", "assembly": "; \n; sub_18006A160 from 0x18006a160 to 0x18006a1f5 (149 bytes)\n; \n; 2 xrefs:\n; > sub_18006A810 @ 0x18006a93b\n; > <???> @ 0x1801acc48\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:53:27 +0000\n; \nmulss   xmm1, cs:dword_180166F10                                       ; +0x0, 0x18006a160\nmov     r8, rcx                                                        ; +0x8, 0x18006a168\ncvttss2si edx, xmm1                                                    ; +0xb, 0x18006a16b\ntest    edx, edx                                                       ; +0xf, 0x18006a16f\njns     short loc_18006A175                                            ; +0x11, 0x18006a171\nneg     edx                                                            ; +0x13, 0x18006a173\nand     edx, 7FFFh                                                     ; +0x15, 0x18006a175\nmov     ecx, edx                                                       ; +0x1b, 0x18006a17b\nshr     ecx, 0Dh                                                       ; +0x1d, 0x18006a17d\ntest    ecx, ecx                                                       ; +0x20, 0x18006a180\njz      short loc_18006A1D6                                            ; +0x22, 0x18006a182\nsub     ecx, 1                                                         ; +0x24, 0x18006a184\njz      short loc_18006A1BD                                            ; +0x27, 0x18006a187\nsub     ecx, 1                                                         ; +0x29, 0x18006a189\njz      short loc_18006A1AA                                            ; +0x2c, 0x18006a18c\ncmp     ecx, 1                                                         ; +0x2e, 0x18006a18e\njz      short loc_18006A198                                            ; +0x31, 0x18006a191\nxorps   xmm1, xmm1                                                     ; +0x33, 0x18006a193\njmp     short loc_18006A1E0                                            ; +0x36, 0x18006a196\nmov     eax, edx                                                       ; +0x38, 0x18006a198\nmov     ecx, 8134h                                                     ; +0x3a, 0x18006a19a\nsub     rcx, rax                                                       ; +0x3f, 0x18006a19f\nmovss   xmm1, dword ptr [r8+rcx*4]                                     ; +0x42, 0x18006a1a2\njmp     short loc_18006A1E0                                            ; +0x48, 0x18006a1a8\nmovss   xmm1, dword ptr [r8+rdx*4-0FB2Ch]                              ; +0x4a, 0x18006a1aa\nxorps   xmm1, cs:xmmword_180144610                                     ; +0x54, 0x18006a1b4\njmp     short loc_18006A1E0                                            ; +0x5b, 0x18006a1bb\nmov     eax, edx                                                       ; +0x5d, 0x18006a1bd\nmov     ecx, 4134h                                                     ; +0x5f, 0x18006a1bf\nsub     rcx, rax                                                       ; +0x64, 0x18006a1c4\nmovss   xmm1, dword ptr [r8+rcx*4]                                     ; +0x67, 0x18006a1c7\nxorps   xmm1, cs:xmmword_180144610                                     ; +0x6d, 0x18006a1cd\njmp     short loc_18006A1E0                                            ; +0x74, 0x18006a1d4\nmovss   xmm1, dword ptr [r8+rdx*4+4D4h]                                ; +0x76, 0x18006a1d6\nmulss   xmm1, cs:dword_180167F4C                                       ; +0x80, 0x18006a1e0\nmovss   xmm0, cs:dword_180167F54                                       ; +0x88, 0x18006a1e8\nsubss   xmm0, xmm1                                                     ; +0x90, 0x18006a1f0\nretn                                                                   ; +0x94, 0x18006a1f4", "xrefs": ["sub_18006A810 @ 0x18006a93b", "<???> @ 0x1801acc48"], "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"}