Function at 0x1400137c0
Capabilities:
Print debug messages

Disassembly:
push rbp
push rbx
push r12
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
mov rax, qword [0x14004d010]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor ebx, ebx
lea rdx, str.Enter_GetBTAdapterStatus___n
mov r12, rcx
mov dword [rbp - 0x19], ebx
mov r14d, ebx
lea ecx, [rbx + 2]
call fcn.140019630
lea rcx, str.Enter_GetBTAdapterStatus___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test r12, r12
jne 0x140013830
lea rdx, str.NULL_input_pointer._n
lea ecx, [rbx + 2]
call fcn.140019630
lea rcx, str.NULL_input_pointer._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
jmp 0x140013d82
mov qword [rsp + 0xc8], rsi
lea rcx, [r12 + 8]
mov qword [rsp + 0xd0], rdi
xor edx, edx
mov qword [rsp + 0xd8], r13
mov r8d, 0x208
mov qword [rsp + 0x90], r15
mov dword [r12], ebx
mov dword [r12 + 4], 0xffffffff
call fcn.14001b960
mov r9d, 0x12
lea rcx, [0x140045458]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov qword [rbp - 9], rax
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140013d36
lea rax, [rbp + 0xf]
mov dword [rbp + 0xf], 0x20
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [0x140045458]
mov dword [rbp - 0xd], ebx
xor edx, edx
mov rcx, rdi
mov esi, ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140013d2d
nop word [rax + rax]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
mov ecx, dword [rbp - 0x19]
call fcn.140021cf0
mov r13, rax
test rax, rax
je 0x140013d9c
mov dword [rax], 8
lea rdx, [rbp + 0xf]
mov r9d, dword [rbp - 0x19]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rbx
mov r8, r13
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
lea rcx, [r13 + 4]
mov dword [rsp + 0x28], ebx
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140013be1
xor ebx, ebx
lea rdx, str.Enter_EnumerateHostController___n
mov r14d, ebx
mov dword [rbp - 0x15], ebx
mov edi, ebx
lea ecx, [rbx + 2]
call fcn.140019630
lea rcx, str.Enter_EnumerateHostController___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov qword [rsp + 0x38], rbx
lea rax, [rbp - 0x15]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rbp + 7]
mov dword [rsp + 0x28], 6
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x220408
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1400139d0
lea rcx, str.Enter_if___DeviceIoControl_sizeof_rootHubName___nBytes__NULL___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140013adb
mov eax, dword [rbp + 7]
mov ecx, eax
mov dword [rbp - 0x15], eax
call fcn.140021cf0
mov rsi, rax
test rax, rax
jne 0x1400139f1
lea rcx, str.Enter_if__rootHubNameW__NULL__n
jmp 0x140013ad2
lea rax, [rbp - 0x15]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov eax, dword [rbp - 0x15]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov edx, 0x220408
mov rcx, r15
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140013a32
lea rcx, str.Enter_if___DeviceIoControl_nBytes__nBytes__NULL___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140013aa5
mov rcx, 0xffffffffffffffff
nop dword [rax]
cmp word [rsi + rcx*2 + 6], bx
lea rcx, [rcx + 1]
jne 0x140013a40
lea rcx, [rcx*2 + 0xa]
call fcn.140021cf0
mov rdi, rax
test rax, rax
je 0x140013aa5
lea r8, str.._
mov edx, 5
mov rcx, rax
call fcn.14002168c
mov rdx, 0xffffffffffffffff
nop dword [rax + rax]
inc rdx
cmp word [rsi + rdx*2 + 4], bx
jne 0x140013a80
inc rdx
lea rcx, [rdi + 8]
lea r8, [rsi + 4]
call fcn.14002168c
mov rcx, rdi
call fcn.140012530
mov r14d, eax
mov rcx, rsi
call fcn.140021af8
test rdi, rdi
je 0x140013aba
mov rcx, rdi
call fcn.140021af8
lea rdx, str.Leave_EnumerateHostController___n
mov ecx, 2
call fcn.140019630
lea rcx, str.Leave_EnumerateHostController___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, dword [rbp - 0xd]
mov qword [rsp + 0x38], rbx
lea rax, [rbp - 0x11]
mov qword [rsp + 0x30], rax
lea r8, [rbp - 1]
lea rax, [rbp - 1]
mov dword [rsp + 0x28], 6
mov r9d, 6
mov qword [rsp + 0x20], rax
mov edx, 0x220424
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140013bac
mov eax, dword [rbp - 1]
mov dword [rbp - 0x11], eax
cmp eax, 6
jbe 0x140013bac
mov ecx, eax
add rcx, rcx
call fcn.140021cf0
mov rdi, rax
test rax, rax
je 0x140013bac
mov r9d, dword [rbp - 0x11]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x38], rbx
mov r8, rdi
mov qword [rsp + 0x30], rax
mov edx, 0x220424
mov dword [rsp + 0x28], r9d
mov rcx, r15
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140013ba4
mov ecx, dword [rdi]
add rcx, rcx
call fcn.140021cf0
mov rbx, rax
test rax, rax
je 0x140013ba2
lea rcx, [rdi + 4]
mov rdx, rax
sub rdx, rcx
nop dword [rax + rax]
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140013b90
jmp 0x140013ba4
xor ebx, ebx
mov rcx, rdi
call fcn.140021af8
mov r9, rbx
lea rdx, str.The_name_of__d_controller_is:__s_n
mov r8d, esi
mov ecx, 2
call fcn.140019630
mov r8, rbx
lea rcx, str.The_name_of__d_controller_is:__s_n
mov edx, esi
call fcn.14000db40
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rbp - 9]
mov rcx, r13
call fcn.140021af8
mov ecx, r14d
test r14d, r14d
je 0x140013ccf
sub ecx, 1
je 0x140013c5f
cmp ecx, 1
jne 0x140013ced
lea rdx, str.The_dongle_is_not_configurated__and_we_should_reset_it__n
mov ecx, 2
call fcn.140019630
lea rcx, str.The_dongle_is_not_configurated__and_we_should_reset_it__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [r12], 2
mov dword [r12 + 4], esi
test rbx, rbx
je 0x140013c45
mov r8, rbx
lea rcx, [r12 + 8]
mov edx, 0x104
call fcn.14002168c
call fcn.140012c20
test eax, eax
jne 0x140013ced
mov dword [r12], 1
jmp 0x140013ced
lea rdx, str.Atheros_dongle_found_and_it_works_normally__n
mov ecx, 2
call fcn.140019630
lea rcx, str.Atheros_dongle_found_and_it_works_normally__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [r12], 1
mov dword [r12 + 4], esi
test rbx, rbx
je 0x140013ca1
mov r8, rbx
lea rcx, [r12 + 8]
mov edx, 0x104
call fcn.14002168c
call fcn.140012c20
cmp eax, 1
jne 0x140013cb5
mov dword [r12], 2
jmp 0x140013ced
lea rdx, str.It_works_fine__n
mov ecx, 2
call fcn.140019630
lea rcx, str.It_works_fine__n
jmp 0x140013ce7
lea rdx, str.No_Atheros_dongle_found__n
mov ecx, 2
call fcn.140019630
lea rcx, str.No_Atheros_dongle_found__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test rbx, rbx
je 0x140013cfa
mov rcx, rbx
call fcn.140021af8
test r14d, r14d
jne 0x140013d2d
inc esi
lea rax, [rbp + 0xf]
mov r9d, esi
mov dword [rbp - 0xd], esi
lea r8, [0x140045458]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov ebx, r14d
test eax, eax
jne 0x1400138d0
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov r8d, 1
lea rdx, str.Leave_GetBTAdapterStatus____d_n
lea ecx, [r8 + 1]
call fcn.140019630
mov edx, 1
lea rcx, str.Leave_GetBTAdapterStatus____d_n
call fcn.14000db40
mov eax, 1
mov r13, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xc8]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140019b40
add rsp, 0x98
pop r14
pop r12
pop rbx
pop rbp
ret
jmp 0x140013d62