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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x194
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x190], eax
push ebx
xor ebx, ebx
push esi
mov esi, ebx
mov dword [0x409a88], ebx
push edi
mov edi, ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], edi
cmp dword [0x408948], ebx
jne 0x403a66
push 4
mov edx, 0x409a6c
mov ecx, 0x401298
call fcn.00404538
test eax, eax
je 0x403a46
cmp eax, 4
jbe 0x403a66
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4b1
xor ecx, ecx
call fcn.00404327
mov dword [0x409a88], 0x80070714
jmp 0x403d9c
mov dword [esp + 0x20], ebx
and dword [esp + 0x14], 0
lea eax, [esp + 0x48]
push 0x44
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [esp + 0x48], 0x44
cmp byte [0x408b62], 0
jne 0x403b86
push 4
lea edx, [esp + 0x1c]
mov ecx, 0x4012a0
call fcn.00404538
test eax, eax
je 0x403b7a
cmp eax, 4
ja 0x403b7a
xor eax, eax
inc eax
cmp dword [esp + 0x18], eax
jne 0x403ac7
mov dword [esp + 0x74], eax
xor eax, eax
jmp 0x403ad5
cmp dword [esp + 0x18], 2
jne 0x403adc
push 6
mov dword [esp + 0x78], eax
pop eax
mov word [esp + 0x78], ax
jmp 0x403aee
push 3
pop ecx
cmp dword [esp + 0x18], ecx
jne 0x403aee
mov dword [esp + 0x74], eax
mov word [esp + 0x78], cx
test ebx, ebx
jne 0x403b9e
mov ax, word [0x408958]
test ax, ax
je 0x403b58
test al, 1
je 0x403b0c
mov ecx, 0x4012ac
jmp 0x403b19
test al, 2
je 0x403d9c
mov ecx, 0x4012b4
push 0x104
lea edx, [esp + 0x94]
call fcn.00404538
test eax, eax
je 0x403b7a
push 0xffffffffffffffff
push 0x401290
push 0xffffffffffffffff
lea eax, [esp + 0x9c]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringA]
sub eax, 2
cmp eax, 0xfffffffe
je 0x403b58
xor esi, esi
inc esi
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x403bee
push 0x104
lea edx, [esp + 0x94]
mov ecx, 0x4012bc
call fcn.00404538
test eax, eax
jne 0x403b9e
xor eax, eax
push eax
push 0x10
push eax
push eax
jmp 0x403a4b
push ecx
push 0x408b62
push ecx
mov edx, 0x104
lea ecx, [esp + 0x9c]
call fcn.0040158c
xor esi, esi
inc esi
cmp ebx, esi
jne 0x403bee
push 0x104
lea edx, [esp + 0x94]
mov ecx, 0x4012c8
call fcn.00404538
test eax, eax
je 0x403b7a
cmp byte [0x408b62], 0
jne 0x403e2b
push 0xffffffffffffffff
push 0x401290
push 0xffffffffffffffff
lea eax, [esp + 0x9c]
push eax
push esi
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringA]
dec eax
dec eax
je 0x403e2b
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x98]
call fcn.00401910
test eax, eax
je 0x403d9c
mov esi, dword [esp + 0x14]
test edi, edi
jne 0x403c36
xor eax, eax
inc eax
cmp word [0x409a80], ax
je 0x403c36
cmp dword [0x408940], 0
je 0x403c36
test esi, esi
jne 0x403c3e
mov dword [esp + 0x24], eax
call fcn.00401e6b
test esi, esi
je 0x403d5a
cmp dword [0x4081c4], 0
je 0x403dfc
test esi, esi
je 0x403d5a
test byte [0x409a74], 4
je 0x403d5a
call fcn.0040635a
mov ebx, eax
test ebx, ebx
je 0x403de3
mov esi, str.DoInfInstall
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
mov dword [esp + 0x14], edx
test edx, edx
je 0x403db3
and dword [esp + 0x28], 0
lea eax, [esp + 0x90]
cmp dword [0x408950], 0
mov edi, dword [esp + 0x10]
mov dword [esp + 0x38], eax
mov ax, word [0x409a80]
mov word [esp + 0x3c], ax
movzx eax, word [0x408958]
mov dword [esp + 0x2c], 0x409194
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0x409224
mov dword [esp + 0x40], eax
je 0x403cda
or eax, 0x10000
mov dword [esp + 0x40], eax
mov ecx, dword [0x409a74]
test cl, 8
je 0x403cee
or eax, 0x20000
mov dword [esp + 0x40], eax
test cl, 0x10
je 0x403cfc
or eax, 0x40000
mov dword [esp + 0x40], eax
mov ecx, dword [0x408c68]
test cl, 0x40
je 0x403d10
or eax, 0x80000
mov dword [esp + 0x40], eax
test cl, cl
jns 0x403d1d
or eax, 0x100000
mov dword [esp + 0x40], eax
mov eax, dword [0x409a78]
mov esi, esp
mov dword [esp + 0x44], eax
mov ecx, edx
lea eax, [esp + 0x28]
push eax
call dword [0x40a290]
call dword [esp + 0x18]
cmp esi, esp
je 0x403d44
mov ecx, 4
int 0x29
mov dword [0x409a88], eax
push ebx
test eax, eax
js 0x403d8f
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [esp + 0x20]
jmp 0x403d6d
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x48]
mov ecx, edi
call fcn.00403e45
test eax, eax
je 0x403d95
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc ebx
mov dword [esp + 0x20], ebx
cmp ebx, 2
jae 0x403e28
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
jmp 0x403a6a
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406c20
mov esp, ebp
pop ebp
ret
push 0
push 0x10
push 0
push esi
mov edx, 0x4c9
xor ecx, ecx
call fcn.00404327
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.0040613c
mov dword [0x409a88], eax
jmp 0x403d9c
push 0
push 0x10
push 0
push 0x4011a8
mov edx, 0x4c8
xor ecx, ecx
call fcn.00404327
jmp 0x403dcd
xor eax, eax
mov edx, 0x4c7
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.00404327
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x409a88], 0x8007042b
jmp 0x403d9c
xor esi, esi
inc esi
cmp dword [0x40856c], 0
je 0x403e39
call fcn.004020af
mov eax, esi
jmp 0x403d9e