Function at 0x1400901c0
Capabilities:
Print debug messages

Disassembly:
push rdi
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rsi
mov ebx, edx
mov rdi, rcx
cmp edx, 0xb
jb 0x1400901ea
xor eax, eax
jmp 0x1400904f2
call fcn.14013d07c
mov r11, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140090209
mov ecx, 0x80004005
call fcn.140001c00
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x60], rax
mov dword [rdi + 0xbc], ebx
cmp dword [rdi + 0xc0], 0
jne 0x14009024d
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140090246
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x1400904f2
cmp dword [rdi + 0x44], 0
je 0x1400902ab
call fcn.140153968
mov rsi, qword [rax + 8]
test rsi, rsi
je 0x1400902ab
mov rcx, qword [rdi + 0x20]
cmp dword [rcx + 0x1d8], 3
je 0x140090292
call fcn.1400603a0
test eax, eax
jne 0x140090292
mov r9d, ebx
lea r8, str.HPX_SPK_Mode
lea rdx, str.Settings
mov rcx, rsi
call fcn.14014baf0
jmp 0x1400902ab
mov r9d, ebx
lea r8, str.HPX_HP_Mode
lea rdx, str.Settings
mov rcx, rsi
call fcn.14014baf0
cmp dword [rdi + 0x44], 0
je 0x1400902d0
mov eax, ebx
sub eax, 4
je 0x1400902cb
sub eax, 3
je 0x1400902c7
cmp eax, 1
jne 0x1400902d0
lea ebx, [rax + 1]
jmp 0x1400902d0
xor ebx, ebx
jmp 0x1400902d0
mov ebx, 1
mov rcx, qword [rdi + 0x20]
call fcn.1400603a0
test eax, eax
jne 0x14009031f
mov rcx, qword [rdi + 0x20]
cmp dword [rcx + 0x1d8], 3
je 0x14009031f
call fcn.140060b00
test eax, eax
je 0x1400902f8
mov r9d, ebx
jmp 0x140090344
xor r9d, r9d
lea r8, str.ASUSDTSAPO3SpkMode
lea rdx, str.Settings
lea rcx, [0x14022e890]
call fcn.14014ba50
lea ecx, [rax + rax*2]
lea r9d, [rbx + rcx*2 + 3]
jmp 0x140090344
xor r9d, r9d
lea r8, str.ASUSDTSAPO3HpMode
lea rdx, str.Settings
lea rcx, [0x14022e890]
call fcn.14014ba50
lea eax, [rax + rax*2 + 3]
lea r9d, [rbx + rax*2]
movsxd rsi, r9d
mov eax, dword [rdi + rsi*4 + 0x60]
mov dword [rsp + 0x20], eax
mov r8d, ebx
lea rdx, str._RTK__DTS_set_Mode___d_index_d_modeindex_d_r_n
lea rcx, [rsp + 0x60]
call fcn.140001f50
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movsxd r11, dword [rdi + rsi*4 + 0x60]
test r11d, r11d
js 0x1400904d4
cmp r11d, dword [rdi + 0x118]
jge 0x1400904d4
test r11d, r11d
js 0x1400904ce
cmp r11, qword [rdi + 0x118]
jge 0x1400904ce
mov r8, qword [rdi + 0x110]
mov r8, qword [r8 + r11*8]
lea rdx, str._RTK__DTS_set_Mode_pSRSOperatingMode_x_r_n
lea rcx, [rsp + 0x60]
call fcn.140001f50
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, str._RTK__DTS_put_OpMode_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movsxd rsi, dword [rdi + rsi*4 + 0x60]
test rsi, rsi
js 0x1400904c8
cmp rsi, qword [rdi + 0x118]
jge 0x1400904c8
mov rax, qword [rdi + 0x110]
mov rsi, qword [rax + rsi*8]
cmp qword [rdi + 0x100], rsi
je 0x14009042f
test rsi, rsi
je 0x140090416
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rdi + 0x100]
test rcx, rcx
je 0x140090428
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rdi + 0x100], rsi
mov rcx, qword [rdi + 0xe0]
mov rax, qword [rcx]
mov rdx, qword [rdi + 0x100]
call qword [rax + 0x40]
test eax, eax
jne 0x140090456
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140090463
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_FAIL_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rdi + 0x38], 0
je 0x1400904a4
mov rcx, qword [rdi + 0xc8]
mov rax, qword [rcx]
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rdi + 0x100]
call qword [rax + 0x30]
test eax, eax
jne 0x140090496
lea rcx, str._RTK__controller__WriteControls_pSRSOperatingModeCurr_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x1400904a4
lea rcx, str._RTK__controller__WriteControls_pSRSOperatingModeCurr_FAIL_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400904c1
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, 1
jmp 0x1400904f2
call fcn.14013d908
int3
call fcn.14013d908
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400904f0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret