Function at 0x14008a320
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 rsi, rcx
call fcn.14012a060
mov rcx, rax
xor r8d, r8d
test rax, rax
setne r8b
test r8d, r8d
jne 0x14008a360
mov ecx, 0x80004005
call fcn.140002cb0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x60], rax
mov dword [rsi + 0x194], ebx
cmp dword [rsi + 0x198], 0
jne 0x14008a3a1
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14008a39a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14008a545
mov rcx, qword [rsi + 0x20]
call fcn.14005f040
test eax, eax
je 0x14008a3d5
xor r9d, r9d
lea r8, str.ASUSDTSAPO3HpMode
lea rdx, str.Settings
lea rcx, [0x140206e90]
call fcn.1401386a8
lea eax, [rax + rax*2 + 3]
lea r9d, [rbx + rax*2]
jmp 0x14008a40c
mov rcx, qword [rsi + 0x20]
call fcn.14005fa70
test eax, eax
je 0x14008a3e7
mov r9d, ebx
jmp 0x14008a40c
xor r9d, r9d
lea r8, str.ASUSDTSAPO3SpkMode
lea rdx, str.Settings
lea rcx, [0x140206e90]
call fcn.1401386a8
lea ecx, [rax + rax*2]
lea r9d, [rbx + rcx*2 + 3]
movsxd rdi, r9d
mov eax, dword [rsi + rdi*4 + 0x140]
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.140004aa0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movsxd r8, dword [rsi + rdi*4 + 0x140]
mov r8, qword [rsi + r8*8 + 0x90]
lea rdx, str._RTK__DTS_set_Mode_pSRSOperatingMode_x_r_n
lea rcx, [rsp + 0x60]
call fcn.140004aa0
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 r11, dword [rsi + rdi*4 + 0x140]
mov rdi, qword [rsi + r11*8 + 0x90]
cmp qword [rsi + 0x88], rdi
je 0x14008a4b5
test rdi, rdi
je 0x14008a49c
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsi + 0x88]
test rcx, rcx
je 0x14008a4ae
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsi + 0x88], rdi
mov rcx, qword [rsi + 0x68]
mov rax, qword [rcx]
mov rdx, qword [rsi + 0x88]
call qword [rax + 0x40]
test eax, eax
jne 0x14008a4d9
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x14008a4e6
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_FAIL_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rsi + 0x38], 0
je 0x14008a524
mov rcx, qword [rsi + 0x50]
mov rax, qword [rcx]
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsi + 0x88]
call qword [rax + 0x30]
test eax, eax
jne 0x14008a516
lea rcx, str._RTK__controller__WriteControls_pSRSOperatingModeCurr_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x14008a524
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 0x14008a540
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 1
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret