{"type": "func", "start": 6443090240, "end": 6443090338, "name": "sub_18009C140", "pseudocode": "// \n// sub_18009C140 from 0x18009c140 to 0x18009c1a2 (98 bytes)\n// \n// 10 xrefs:\n// > sub_180069DE0 @ 0x180069e58\n// > sub_180075590 @ 0x18007565d\n// > sub_180088830 @ 0x1800888a8\n// > sub_18008B040 @ 0x18008b0b4\n// > FMOD::DSP::setParameterInt @ 0x1800a3ea4\n// > sub_1800BC770 @ 0x1800bc804\n// > sub_1800E98E0 @ 0x1800e99c6\n// > sub_180108000 @ 0x1801082d6\n// > sub_1801089F0 @ 0x180108bfd\n// > sub_18010A4A0 @ 0x18010a535\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_18009C140(__int64 a1, __int64 a2, int a3)\n{\n  __int64 v5; // r9\n  _DWORD *v7; // r8\n  _QWORD *v8; // rcx\n  __int64 v9; // r8\n\n  if ( (int)a2 < 0 )\n    return 31;\n  v5 = *(_QWORD *)(a1 + 232);\n  if ( !v5 || (int)a2 >= *(_DWORD *)(v5 + 96) )\n    return 31;\n  if ( !*(_QWORD *)(v5 + 120) )\n    return 68;\n  v7 = *(_DWORD **)(*(_QWORD *)(v5 + 104) + 8LL * (int)a2);\n  if ( *v7 != 1 )\n    return 31;\n  v8 = (_QWORD *)(a1 + 176);\n  if ( a3 < v7[12] )\n    a3 = v7[12];\n  v9 = (unsigned int)v7[13];\n  *v8 = a1;\n  if ( a3 <= (int)v9 )\n    v9 = (unsigned int)a3;\n  return (*(__int64 (__fastcall **)(_QWORD *, __int64, __int64))(v5 + 120))(v8, a2, v9);\n}", "assembly": "; \n; sub_18009C140 from 0x18009c140 to 0x18009c1a2 (98 bytes)\n; \n; 10 xrefs:\n; > sub_180069DE0 @ 0x180069e58\n; > sub_180075590 @ 0x18007565d\n; > sub_180088830 @ 0x1800888a8\n; > sub_18008B040 @ 0x18008b0b4\n; > FMOD::DSP::setParameterInt @ 0x1800a3ea4\n; > sub_1800BC770 @ 0x1800bc804\n; > sub_1800E98E0 @ 0x1800e99c6\n; > sub_180108000 @ 0x1801082d6\n; > sub_1801089F0 @ 0x180108bfd\n; > sub_18010A4A0 @ 0x18010a535\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     r11d, r8d                                                      ; +0x0, 0x18009c140\nmov     r10, rcx                                                       ; +0x3, 0x18009c143\ntest    edx, edx                                                       ; +0x6, 0x18009c146\njs      short loc_18009C19C                                            ; +0x8, 0x18009c148\nmov     r9, [rcx+0E8h]                                                 ; +0xa, 0x18009c14a\ntest    r9, r9                                                         ; +0x11, 0x18009c151\njz      short loc_18009C19C                                            ; +0x14, 0x18009c154\ncmp     edx, [r9+60h]                                                  ; +0x16, 0x18009c156\njge     short loc_18009C19C                                            ; +0x1a, 0x18009c15a\ncmp     qword ptr [r9+78h], 0                                          ; +0x1c, 0x18009c15c\njnz     short loc_18009C169                                            ; +0x21, 0x18009c161\nmov     eax, 44h ; 'D'                                                 ; +0x23, 0x18009c163\nretn                                                                   ; +0x28, 0x18009c168\nmov     rax, [r9+68h]                                                  ; +0x29, 0x18009c169\nmovsxd  rcx, edx                                                       ; +0x2d, 0x18009c16d\nmov     r8, [rax+rcx*8]                                                ; +0x30, 0x18009c170\ncmp     dword ptr [r8], 1                                              ; +0x34, 0x18009c174\njnz     short loc_18009C19C                                            ; +0x38, 0x18009c178\ncmp     r11d, [r8+30h]                                                 ; +0x3a, 0x18009c17a\nlea     rcx, [r10+0B0h]                                                ; +0x3e, 0x18009c17e\ncmovl   r11d, [r8+30h]                                                 ; +0x45, 0x18009c185\nmov     r8d, [r8+34h]                                                  ; +0x4a, 0x18009c18a\ncmp     r11d, r8d                                                      ; +0x4e, 0x18009c18e\nmov     [rcx], r10                                                     ; +0x51, 0x18009c191\ncmovle  r8d, r11d                                                      ; +0x54, 0x18009c194\njmp     qword ptr [r9+78h]                                             ; +0x58, 0x18009c198\nmov     eax, 1Fh                                                       ; +0x5c, 0x18009c19c\nretn                                                                   ; +0x61, 0x18009c1a1", "xrefs": ["sub_180069DE0 @ 0x180069e58", "sub_180075590 @ 0x18007565d", "sub_180088830 @ 0x1800888a8", "sub_18008B040 @ 0x18008b0b4", "FMOD::DSP::setParameterInt @ 0x1800a3ea4", "sub_1800BC770 @ 0x1800bc804", "sub_1800E98E0 @ 0x1800e99c6", "sub_180108000 @ 0x1801082d6", "sub_1801089F0 @ 0x180108bfd", "sub_18010A4A0 @ 0x18010a535"], "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"}