Function at 0x405c54
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1044
call fcn.0040c750
push esi
mov esi, ecx
push str.__CWinNT5::StateChange
call fcn.004013fd
mov eax, dword [esi + 0x1c]
pop ecx
test eax, eax
je 0x405ed6
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetupDiEnumDeviceInfo
push eax
call edi
push str.SetupDiGetDeviceRegistryPropertyA
mov dword [esi + 0x24], eax
push dword [esi + 0x1c]
call edi
push str.SetupDiCallClassInstaller
mov dword [esi + 0x34], eax
push dword [esi + 0x1c]
call edi
push str.SetupDiSetClassInstallParamsA
mov dword [esi + 0x30], eax
push dword [esi + 0x1c]
call edi
push str.CM_Get_DevNode_Status
mov dword [esi + 0x38], eax
push dword [esi + 0x1c]
call edi
and dword [ebp - 8], 0
mov dword [esi + 0x48], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x44], 8
push eax
mov dword [ebp - 0x30], 0x1c
push 0
push dword [ebp + 0xc]
call dword [esi + 0x24]
test eax, eax
je 0x405ed1
lea ecx, [ebp - 4]
mov eax, 0x1000
push ecx
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x1044]
lea ebx, [ebp - 0x1044]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x30]
push 1
push eax
push dword [ebp + 0xc]
call dword [esi + 0x34]
test eax, eax
jne 0x405d69
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xd
je 0x405d69
call edi
cmp eax, 0x7a
jne 0x405d54
test ebx, ebx
je 0x405d34
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 4]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push str.GetDeviceRegistryProperty
mov ebx, eax
call fcn.004013fd
mov dword [esp], 0x4263fc
jmp 0x405d59
push str.GetDeviceRegistryProperty
call fcn.004013fd
pop ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
jmp 0x405d01
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x405eaf
cmp byte [ebx], 0
mov edi, ebx
je 0x405ea4
mov eax, dword [ebp - 4]
add eax, ebx
cmp edi, eax
jae 0x405ea4
push str.PCIVEN_1106
call fcn.0040c0a0
push eax
push edi
push str.PCIVEN_1106
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405db9
push edi
call fcn.0040c0a0
cmp eax, 0x28
pop ecx
ja 0x405e0f
push str.USBVID_040D
call fcn.0040c0a0
push eax
push edi
push str.USBVID_040D
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405de2
push edi
call fcn.0040c0a0
cmp eax, 0x18
pop ecx
ja 0x405e0f
push str.USBVID_160A
call fcn.0040c0a0
push eax
push edi
push str.USBVID_160A
call fcn.0040c5df
add esp, 0x10
test eax, eax
jne 0x405e8e
push edi
call fcn.0040c0a0
cmp eax, 0x18
pop ecx
jbe 0x405e8e
push 0
lea eax, [ebp - 0xc]
push dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [esi + 0x48]
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push str.CM_Get_DevNode_Status_pulStatus__u_pulProblemNumber__u
call fcn.004013fd
mov eax, dword [ebp + 8]
add esp, 0xc
push 1
pop ecx
cmp eax, ecx
jne 0x405e48
cmp dword [ebp + 0x10], 0
jne 0x405e48
cmp dword [ebp - 0xc], 0x16
jne 0x405ea4
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x44]
push 0x14
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x40], 0x12
push eax
mov dword [ebp - 0x38], ecx
push dword [ebp + 0xc]
call dword [esi + 0x38]
test eax, eax
je 0x405ebe
push dword [ebp + 8]
push edi
push str.CWinNT5::StateChange__s___d
call fcn.004013fd
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 0xc]
push 0x12
call dword [esi + 0x30]
test eax, eax
je 0x405ebe
and dword [ebp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [edi + eax + 1], 0
lea edi, [edi + eax + 1]
jne 0x405d83
test ebx, ebx
je 0x405eaf
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc dword [ebp - 8]
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 8]
jmp 0x405cd9
xor esi, esi
push 0x42638c
call fcn.004013fd
pop ecx
pop edi
mov eax, esi
pop ebx
jmp 0x405ed9
push 1
pop esi
jmp 0x405ec0
push 1
pop eax
pop esi
leave
ret 0xc