Function at 0x140013760
Capabilities:
Print debug messages

Disassembly:
push rbp
push rbx
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x140052010]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r15d, r15d
lea rdx, str.Enter_GetBTAdapterStatus___n
mov r12, rcx
mov dword [rbp - 0x19], r15d
mov ebx, r15d
mov r14d, r15d
lea ecx, [r15 + 2]
call fcn.1400194a0
lea rcx, str.Enter_GetBTAdapterStatus___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test r12, r12
jne 0x1400137d9
lea rdx, str.NULL_input_pointer._n
lea ecx, [r15 + 2]
call fcn.1400194a0
lea rcx, str.NULL_input_pointer._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
jmp 0x140013d22
mov qword [rsp + 0xc8], rsi
lea rcx, [r12 + 8]
mov qword [rsp + 0xd0], rdi
xor edx, edx
mov r8d, 0x208
mov qword [rsp + 0xd8], r13
mov dword [r12], r15d
mov dword [r12 + 4], 0xffffffff
call fcn.14001bd50
mov r9d, 0x12
lea rcx, [0x14004a8a8]
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 0x140013cde
lea rax, [rbp + 0xf]
mov dword [rbp + 0xf], 0x20
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [0x14004a8a8]
mov dword [rbp - 0xd], r15d
xor edx, edx
mov rcx, rdi
mov esi, r15d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140013cd5
nop dword [rax]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], r15
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.140025c00
mov r13, rax
test rax, rax
je 0x140013d3e
mov dword [rax], 8
lea rdx, [rbp + 0xf]
mov r9d, dword [rbp - 0x19]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], r15
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], r15
lea rcx, [r13 + 4]
mov dword [rsp + 0x28], r15d
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 0x140013b81
xor ebx, ebx
lea rdx, str.Enter_EnumerateHostController___n
mov dword [rbp - 0x15], ebx
lea ecx, [rbx + 2]
call fcn.1400194a0
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 0x14001396f
lea rcx, str.Enter_if___DeviceIoControl_sizeof_rootHubName___nBytes__NULL___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov r14d, ebx
jmp 0x140013a81
mov eax, dword [rbp + 7]
mov ecx, eax
mov dword [rbp - 0x15], eax
call fcn.140025c00
mov rdi, rax
test rax, rax
jne 0x140013999
lea rcx, str.Enter_if__rootHubNameW__NULL__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov r14d, ebx
jmp 0x140013a81
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], rdi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1400139da
lea rcx, str.Enter_if___DeviceIoControl_nBytes__nBytes__NULL___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140013a58
mov rcx, 0xffffffffffffffff
cmp word [rdi + rcx*2 + 6], bx
lea rcx, [rcx + 1]
jne 0x1400139e1
lea rcx, [rcx*2 + 0xa]
call fcn.140025c00
mov rsi, rax
test rax, rax
je 0x140013a55
lea r8, str.._
mov edx, 5
mov rcx, rax
call fcn.140025408
mov rdx, 0xffffffffffffffff
nop dword [rax]
inc rdx
cmp word [rdi + rdx*2 + 4], bx
jne 0x140013a20
inc rdx
lea rcx, [rsi + 8]
lea r8, [rdi + 4]
call fcn.140025408
mov rcx, rsi
call fcn.1400124b0
mov rcx, rdi
mov r14d, eax
call fcn.140025a08
mov rdi, rsi
mov esi, dword [rbp - 0xd]
jmp 0x140013a5b
mov esi, dword [rbp - 0xd]
mov r14d, ebx
mov rcx, rdi
call fcn.140025a08
lea rdx, str.Leave_EnumerateHostController___n
mov ecx, 2
call fcn.1400194a0
lea rcx, str.Leave_EnumerateHostController___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
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 0x140013b4c
mov eax, dword [rbp - 1]
mov dword [rbp - 0x11], eax
cmp eax, 6
jbe 0x140013b4c
mov ecx, eax
add rcx, rcx
call fcn.140025c00
mov rdi, rax
test rax, rax
je 0x140013b4c
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 0x140013b44
mov ecx, dword [rdi]
add rcx, rcx
call fcn.140025c00
mov rbx, rax
test rax, rax
je 0x140013b42
lea rax, [rdi + 4]
mov rdx, rbx
sub rdx, rax
nop
movzx ecx, word [rax]
mov word [rdx + rax], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140013b30
jmp 0x140013b44
xor ebx, ebx
mov rcx, rdi
call fcn.140025a08
mov r9, rbx
lea rdx, str.The_name_of__d_controller_is:__s_n
mov r8d, esi
mov ecx, 2
call fcn.1400194a0
mov r8, rbx
lea rcx, str.The_name_of__d_controller_is:__s_n
mov edx, esi
call fcn.14000db70
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rbp - 9]
mov rcx, r13
call fcn.140025a08
mov ecx, r14d
test r14d, r14d
je 0x140013c6f
sub ecx, 1
je 0x140013bff
cmp ecx, 1
jne 0x140013c8d
lea rdx, str.The_dongle_is_not_configurated__and_we_should_reset_it__n
mov ecx, 2
call fcn.1400194a0
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 0x140013be5
mov r8, rbx
lea rcx, [r12 + 8]
mov edx, 0x104
call fcn.140025408
call fcn.140012bc0
test eax, eax
jne 0x140013c8d
mov dword [r12], 1
jmp 0x140013c8d
lea rdx, str.Atheros_dongle_found_and_it_works_normally__n
mov ecx, 2
call fcn.1400194a0
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 0x140013c41
mov r8, rbx
lea rcx, [r12 + 8]
mov edx, 0x104
call fcn.140025408
call fcn.140012bc0
cmp eax, 1
jne 0x140013c55
mov dword [r12], 2
jmp 0x140013c8d
lea rdx, str.It_works_fine__n
mov ecx, 2
call fcn.1400194a0
lea rcx, str.It_works_fine__n
jmp 0x140013c87
lea rdx, str.No_Atheros_dongle_found__n
mov ecx, 2
call fcn.1400194a0
lea rcx, str.No_Atheros_dongle_found__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test rbx, rbx
je 0x140013ca2
mov rcx, rbx
call fcn.140025a08
xor r15d, r15d
mov ebx, r15d
jmp 0x140013ca5
xor r15d, r15d
test r14d, r14d
jne 0x140013cd5
inc esi
lea rax, [rbp + 0xf]
mov r9d, esi
mov dword [rbp - 0xd], esi
lea r8, [0x14004a8a8]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x140013870
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.1400194a0
mov edx, 1
lea rcx, str.Leave_GetBTAdapterStatus____d_n
call fcn.14000db70
mov eax, 1
mov rdi, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xc8]
mov r13, qword [rsp + 0xd8]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400198d0
add rsp, 0x90
pop r15
pop r14
pop r12
pop rbx
pop rbp
ret
jmp 0x140013d0a