Function at 0x401060
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
sub esp, 0x38
mov eax, dword [0x40f040]
xor eax, esp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
push ebx
push edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x50]
xor ebx, ebx
push str.SETUPAPI.DLL
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], 1
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x1c], edi
je 0x401278
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetupDiDestroyDeviceInfoList
push edi
call esi
push str.SetupDiEnumDeviceInfo
push edi
mov dword [0x410ac0], eax
call esi
push str.SetupDiGetClassDevsA
push edi
mov dword [0x410abc], eax
call esi
push str.SetupDiGetDeviceRegistryPropertyA
push edi
mov dword [0x410ab8], eax
call esi
push str.SetupDiRemoveDevice
push edi
mov dword [0x410ab4], eax
call esi
cmp dword [esp + 0x50], ebx
mov dword [0x410ab0], eax
je 0x4010fb
push 6
push ebx
push ebx
push ebx
jmp 0x401104
push 2
push ebx
push ebx
push 0x40c20c
call dword [0x410ab8]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40124d
lea ecx, [esp + 0x28]
push ecx
push ebx
push ebp
mov dword [esp + 0x34], 0x1c
mov dword [esp + 0x24], ebx
call dword [0x410abc]
test eax, eax
je 0x401228
mov esi, dword [esp + 0x54]
lea edx, [esp + 0x10]
push edx
push ebx
push ebx
push ebx
push esi
lea eax, [esp + 0x3c]
push eax
push ebp
xor edi, edi
mov dword [esp + 0x2c], ebx
call dword [0x410ab4]
cmp eax, ebx
jne 0x40118d
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x401204
push eax
call fcn.00401d47
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov edi, eax
push edi
push ebx
push esi
lea eax, [esp + 0x3c]
push eax
push ebp
call dword [0x410ab4]
cmp eax, ebx
je 0x4011f3
cmp byte [edi], bl
mov esi, edi
je 0x4011f3
mov ecx, dword [esp + 0x10]
add ecx, edi
cmp esi, ecx
jae 0x4011f3
push esi
push str._TRACE_Checking_device:__s_n
call fcn.00401000
mov edx, dword [esp + 0x24]
push esi
push edx
call fcn.00402052
add esp, 0x10
test eax, eax
je 0x4011d7
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4011c0
sub eax, edx
cmp byte [esi + eax + 1], bl
lea esi, [esi + eax + 1]
jne 0x401193
jmp 0x4011f3
mov eax, dword [esp + 0x1c]
push eax
push str._TRACE_The_device___s__is_found_n
call fcn.00401000
mov ecx, dword [esp + 0x28]
add esp, 8
mov dword [ecx], 1
cmp edi, ebx
je 0x401204
push edi
call fcn.00401db1
add esp, 4
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x28]
add eax, 1
push edx
push eax
push ebp
mov dword [esp + 0x24], eax
call dword [0x410abc]
test eax, eax
jne 0x401136
mov edi, dword [esp + 0x24]
push ebp
call dword [0x410ac0]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
pop esi
pop ebp
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00401b6f
add esp, 0x38
ret
push str._ERROR_DeviceInfoSet_is_INVALID_HANDLE_VALUE_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop ebp
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00401b6f
add esp, 0x38
ret
mov ecx, dword [esp + 0x3c]
pop edi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00401b6f
add esp, 0x38
ret