Function at 0x14008a2f0
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.140129a50
mov rcx, rax
xor r8d, r8d
test rax, rax
setne r8b
test r8d, r8d
jne 0x14008a330
mov ecx, 0x80004005
call fcn.140002d80
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 0x14008a371
lea rdx, [rax - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14008a36a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14008a515
mov rcx, qword [rsi + 0x20]
call fcn.14005ecc0
test eax, eax
je 0x14008a3a5
xor r9d, r9d
lea r8, str.ASUSDTSAPO3HpMode
lea rdx, str.Settings
lea rcx, [0x140206e90]
call fcn.1401380a8
lea eax, [rax + rax*2 + 3]
lea r9d, [rbx + rax*2]
jmp 0x14008a3dc
mov rcx, qword [rsi + 0x20]
call fcn.14005f5d0
test eax, eax
je 0x14008a3b7
mov r9d, ebx
jmp 0x14008a3dc
xor r9d, r9d
lea r8, str.ASUSDTSAPO3SpkMode
lea rdx, str.Settings
lea rcx, [0x140206e90]
call fcn.1401380a8
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.140004be0
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.140004be0
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 0x14008a485
test rdi, rdi
je 0x14008a46c
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsi + 0x88]
test rcx, rcx
je 0x14008a47e
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 0x14008a4a9
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x14008a4b6
lea rcx, str._RTK__pSRSEpInfo__put_OpMode_FAIL_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rsi + 0x38], 0
je 0x14008a4f4
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 0x14008a4e6
lea rcx, str._RTK__controller__WriteControls_pSRSOperatingModeCurr_OK_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x14008a4f4
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 0x14008a510
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