Function at 0x405040
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x467463
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x464
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x20], ecx
call fcn.004318b0
xor ebx, ebx
test eax, eax
je 0x4050fe
push ebx
lea eax, [esp + 0x78]
push str.CInstall_::_InstallSoftwareDevice_n
push eax
call fcn.0044cb10
mov edi, str.ENTRY:
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x174]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x174]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x74]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00431840
mov ecx, eax
call fcn.004318e0
lea eax, [esp + 0x174]
push eax
call fcn.00431840
mov ecx, eax
call fcn.00431c70
mov eax, dword [0x4855a4]
xor ebp, ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x47c], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x58], 0x46f63c
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], 0xa
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x47c], 2
mov edi, dword [ecx + 0x40c]
cmp edi, ebx
je 0x405328
mov eax, edi
mov edi, dword [edi]
lea ecx, [esp + 0x24]
lea esi, [eax + 8]
push esi
call fcn.0045cec5
lea edx, [esi + 4]
lea ecx, [esp + 0x28]
push edx
call fcn.0045cec5
lea eax, [esi + 8]
lea ecx, [esp + 0x2c]
push eax
call fcn.0045cec5
lea ecx, [esi + 0xc]
push ecx
lea ecx, [esp + 0x34]
call fcn.0045cec5
lea edx, [esi + 0x10]
lea ecx, [esp + 0x34]
push edx
call fcn.0045cec5
lea eax, [esi + 0x14]
lea ecx, [esp + 0x38]
push eax
call fcn.0045cec5
lea ecx, [esi + 0x18]
push ecx
lea ecx, [esp + 0x40]
call fcn.0045cec5
lea edx, [esi + 0x1c]
lea ecx, [esp + 0x40]
push edx
call fcn.0045cec5
lea eax, [esi + 0x20]
lea ecx, [esp + 0x44]
push eax
call fcn.0045cec5
lea ecx, [esi + 0x24]
push ecx
lea ecx, [esp + 0x4c]
call fcn.0045cec5
lea edx, [esi + 0x28]
lea ecx, [esp + 0x4c]
push edx
call fcn.0045cec5
mov ecx, dword [esp + 0x28]
mov eax, dword [esi + 0x2c]
push str.SYSTEM
push ecx
mov dword [esp + 0x58], eax
call fcn.0044d010
add esp, 8
test eax, eax
jne 0x40530d
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x10]
push edx
call fcn.0045cec5
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x18]
push eax
call fcn.0045cec5
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call fcn.0045cec5
call fcn.004318b0
test eax, eax
je 0x4052a2
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push edx
push eax
push ecx
lea edx, [esp + 0x80]
push str.csINFFileName___s__csDeviceDesc___s__csDeviceID___s_n
push edx
call fcn.0044cb10
add esp, 0x14
lea eax, [esp + 0x74]
push eax
call fcn.00431840
mov ecx, eax
call fcn.00431c70
sub esp, 0x10
lea ecx, [esp + 0x20]
mov dword [esp + 0x64], esp
mov esi, esp
push ecx
mov ecx, esi
mov dword [esp + 0x68], esi
call fcn.0045cb4d
lea edx, [esp + 0x24]
lea ecx, [esi + 4]
push edx
mov byte [esp + 0x490], 3
call fcn.0045cb4d
lea eax, [esp + 0x28]
lea ecx, [esi + 8]
push eax
mov byte [esp + 0x490], 4
call fcn.0045cb4d
lea ecx, [esp + 0x2c]
mov byte [esp + 0x48c], 5
push ecx
lea ecx, [esi + 0xc]
call fcn.0045cb4d
lea ecx, [esp + 0x68]
mov byte [esp + 0x48c], 2
call fcn.00409250
jmp 0x405320
mov eax, dword [esp + 0x50]
cmp eax, 3
je 0x40531b
cmp eax, 1
jne 0x405320
mov ebp, 1
cmp edi, ebx
jne 0x405186
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x58]
push edx
lea ecx, [eax + 0x358]
call fcn.00448120
call fcn.004318b0
test eax, eax
je 0x4053db
push ebp
lea ecx, [esp + 0x378]
push str.CInstall_::_InstallSoftwareDevice_:_bNonInstalledDevices___d_n
push ecx
call fcn.0044cb10
mov edi, str.EXIT:
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x274]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x274]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x374]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x274]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00431840
mov ecx, eax
call fcn.00431c70
call fcn.00431840
mov ecx, eax
call fcn.004318f0
mov dword [esp + 0x58], 0x46f63c
lea ecx, [esp + 0x58]
mov byte [esp + 0x47c], 6
call fcn.004098c0
lea ecx, [esp + 0x10]
mov byte [esp + 0x47c], bl
call fcn.00405440
lea ecx, [esp + 0x24]
mov dword [esp + 0x47c], 0xffffffff
call fcn.00402f30
mov ecx, dword [esp + 0x474]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x470
ret