Function at 0x401650
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x4c
mov eax, dword [0x4762c4]
xor eax, esp
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
push ebx
push ebp
push str.SETUPAPI.DLL
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov byte [esp + 0xf], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
xor ebx, ebx
cmp ebp, ebx
mov dword [esp + 0x18], ebp
je 0x401862
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.SetupDiDestroyDeviceInfoList
push ebp
call esi
push str.SetupDiEnumDeviceInfo
push ebp
mov dword [esp + 0x2c], eax
call esi
push str.SetupDiGetClassDevsA
push ebp
mov dword [esp + 0x20], eax
call esi
push str.SetupDiGetDeviceRegistryPropertyA
push ebp
mov edi, eax
call esi
push str.SetupDiRemoveDevice
push ebp
mov dword [esp + 0x30], eax
call esi
cmp dword [esp + 0x24], ebx
mov dword [esp + 0x38], eax
je 0x401844
cmp dword [esp + 0x18], ebx
je 0x401844
cmp edi, ebx
je 0x401844
cmp dword [esp + 0x28], ebx
je 0x401844
cmp eax, ebx
je 0x401844
push 4
push ebx
push ebx
push ebx
call edi
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40183c
lea edx, [esp + 0x3c]
push edx
push ebx
push ebp
mov dword [esp + 0x48], 0x1c
mov dword [esp + 0x28], ebx
call dword [esp + 0x24]
test eax, eax
je 0x401815
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push ebx
push 1
lea ecx, [esp + 0x50]
push ecx
push ebp
mov dword [esp + 0x48], ebx
xor edi, edi
mov dword [esp + 0x30], ebx
call esi
cmp eax, ebx
jne 0x401786
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x4017f7
push eax
call fcn.0042f832
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
push eax
push edi
push ebx
push 1
lea ecx, [esp + 0x50]
push ecx
push ebp
call esi
cmp eax, ebx
je 0x4017cf
cmp byte [edi], bl
mov esi, edi
je 0x4017cf
lea esp, [esp]
mov edx, dword [esp + 0x14]
add edx, edi
cmp esi, edx
jae 0x4017cf
mov eax, dword [esp + 0x30]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4017c7
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4017b0
sub eax, edx
cmp byte [esi + eax + 1], bl
lea esi, [esi + eax + 1]
jne 0x401790
jmp 0x4017cf
mov dword [esp + 0x2c], 1
cmp edi, ebx
je 0x4017dc
push edi
call fcn.0042f837
add esp, 4
cmp dword [esp + 0x2c], ebx
je 0x4017f7
lea ecx, [esp + 0x3c]
push ecx
push ebp
call dword [esp + 0x40]
test eax, eax
je 0x4017f7
mov edx, dword [esp + 0x34]
mov byte [edx], 1
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x3c]
add eax, 1
push ecx
push eax
push ebp
mov dword [esp + 0x28], eax
call dword [esp + 0x24]
test eax, eax
jne 0x401731
push ebp
call dword [esp + 0x28]
mov ebp, dword [esp + 0x20]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00440494
add esp, 0x4c
ret
mov ebp, dword [esp + 0x20]
mov byte [esp + 0x13], bl
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00440494
add esp, 0x4c
ret
mov ecx, dword [esp + 0x50]
pop ebp
pop ebx
xor ecx, esp
xor al, al
call fcn.00440494
add esp, 0x4c
ret