Function at 0x412050
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x434304]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push str.Enter_GetBTAdapterStatus___n
lea ecx, [edi + 2]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
call fcn.00415320
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 4
push str.Enter_GetBTAdapterStatus___n
call ebx
test esi, esi
jne 0x4120bb
push str.NULL_input_pointer._n
lea ecx, [esi + 2]
call fcn.00415320
add esp, 4
push str.NULL_input_pointer._n
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041558a
mov esp, ebp
pop ebp
ret
push 0x208
mov dword [esi], edi
mov dword [esi + 4], 0xffffffff
add esi, 8
push 0
push esi
call fcn.0041d650
add esp, 0xc
push 0x12
push 0
push 0
push 0x42eadc
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
mov dword [ebp - 0x28], ebx
cmp ebx, 0xffffffff
je 0x412316
lea eax, [ebp - 0x20]
push eax
push 0
push 0x42eadc
push 0
push ebx
mov dword [ebp - 0x20], 0x1c
mov dword [ebp - 0x24], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x41230f
lea esp, [esp]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0
lea edx, [ebp - 0x20]
push edx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004158a5
mov esi, eax
add esp, 4
test esi, esi
je 0x412336
push 0
lea ecx, [ebp - 0x2c]
push ecx
mov dword [esi], 6
mov edx, dword [ebp - 0x2c]
push edx
push esi
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push 0
push 0
push 3
push 0
push 2
push 0x40000000
lea ecx, [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4121c8
mov ecx, ebx
call fcn.004113e0
mov dword [ebp - 0x30], eax
call fcn.00410de0
mov edx, dword [ebp - 0x24]
mov edi, eax
push edi
push edx
push str.The_name_of__d_controller_is:__s_n
mov ecx, 2
call fcn.00415320
mov eax, dword [ebp - 0x24]
add esp, 0xc
push edi
push eax
push str.The_name_of__d_controller_is:__s_n
call fcn.0040ca40
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0041586b
mov eax, dword [ebp - 0x30]
add esp, 4
sub eax, 0
je 0x4122b0
dec eax
je 0x41223f
dec eax
jne 0x4122cd
push str.The_dongle_is_not_configurated__and_we_should_reset_it__n
lea ecx, [eax + 2]
call fcn.00415320
add esp, 4
push str.The_dongle_is_not_configurated__and_we_should_reset_it__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x24]
mov dword [esi], 2
mov dword [esi + 4], ecx
test edi, edi
je 0x412227
push edi
lea eax, [esi + 8]
push 0x104
push eax
call fcn.00415b9a
add esp, 0xc
call fcn.00411570
test eax, eax
jne 0x4122cd
mov dword [esi], 1
jmp 0x4122cd
push str.Atheros_dongle_found_and_it_works_normally__n
mov ecx, 2
call fcn.00415320
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 4
push str.Atheros_dongle_found_and_it_works_normally__n
call ebx
mov esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x24]
mov dword [esi], 1
mov dword [esi + 4], edx
test edi, edi
je 0x412283
push edi
lea eax, [esi + 8]
push 0x104
push eax
call fcn.00415b9a
add esp, 0xc
call fcn.00411570
cmp eax, 1
jne 0x412295
mov dword [esi], 2
jmp 0x4122cd
push str.It_works_fine__n
mov ecx, 2
call fcn.00415320
add esp, 4
push str.It_works_fine__n
call ebx
jmp 0x4122cd
push str.No_Atheros_dongle_found__n
mov ecx, 2
call fcn.00415320
add esp, 4
push str.No_Atheros_dongle_found__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test edi, edi
je 0x4122dc
push edi
call fcn.0041586b
add esp, 4
xor edi, edi
cmp dword [ebp - 0x30], 0
jne 0x41230c
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x20]
push ecx
inc eax
push eax
push 0x42eadc
push 0
push edx
mov dword [ebp - 0x24], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov ebx, dword [ebp - 0x28]
test eax, eax
jne 0x412120
jmp 0x41230f
mov ebx, dword [ebp - 0x28]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0
push str.Leave_GetBTAdapterStatus____d_n
mov ecx, 2
call fcn.00415320
push 0
push str.Leave_GetBTAdapterStatus____d_n
call fcn.0040ca40
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041558a
mov esp, ebp
pop ebp
ret