Function at 0x403d86
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 [0x408004]
xor eax, esp
mov dword [esp + 0x190], eax
push ebx
push esi
xor esi, esi
and dword [0x409124], esi
push edi
xor edi, edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
cmp dword [0x408a28], esi
jne 0x403de1
push 4
mov edx, 0x409a2c
mov ecx, 0x4012e0
call fcn.004048a1
test eax, eax
je 0x403f00
cmp eax, 4
ja 0x403f00
xor ebx, ebx
mov dword [esp + 0x1c], 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 [0x408c42], 0
jne 0x403f22
push 4
lea edx, [esp + 0x1c]
mov ecx, 0x4012e8
call fcn.004048a1
test eax, eax
je 0x403f00
cmp eax, 4
ja 0x403f00
xor eax, eax
inc eax
cmp dword [esp + 0x18], eax
jne 0x403e44
mov dword [esp + 0x74], eax
xor eax, eax
jmp 0x403e52
cmp dword [esp + 0x18], 2
jne 0x403e59
push 6
mov dword [esp + 0x78], eax
pop eax
mov word [esp + 0x78], ax
jmp 0x403e6b
push 3
pop ecx
cmp dword [esp + 0x18], ecx
jne 0x403e6b
mov dword [esp + 0x74], eax
mov word [esp + 0x78], cx
test ebx, ebx
jne 0x403f3a
mov ax, word [0x408a38]
test ax, ax
je 0x403eda
test al, 1
je 0x403e89
mov ecx, 0x4012f4
jmp 0x403e96
test al, 2
je 0x40413a
mov ecx, 0x4012fc
push 0x104
lea edx, [esp + 0x94]
call fcn.004048a1
test eax, eax
je 0x403f00
push 0xffffffffffffffff
push 0x4012d8
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 0x403eda
xor esi, esi
inc esi
mov dword [esp + 0x20], esi
jmp 0x403f8b
test esi, esi
jne 0x403f8b
push 0x104
lea edx, [esp + 0x94]
mov ecx, 0x401304
call fcn.004048a1
test eax, eax
jne 0x403f8b
xor eax, eax
mov edx, 0x4b1
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.004046c7
mov dword [0x409124], 0x80070714
jmp 0x40413a
push ecx
push 0x408c42
push ecx
mov edx, 0x104
lea ecx, [esp + 0x9c]
call fcn.00401846
xor esi, esi
inc esi
cmp ebx, esi
jne 0x403f8b
push 0x104
lea edx, [esp + 0x94]
mov ecx, 0x401310
call fcn.004048a1
test eax, eax
je 0x403f00
cmp byte [0x408c42], 0
jne 0x4041c7
push 0xffffffffffffffff
push 0x4012d8
push 0xffffffffffffffff
lea eax, [esp + 0x9c]
push eax
push esi
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringA]
dec eax
sub eax, esi
je 0x4041c7
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x98]
call fcn.00401bd3
test eax, eax
je 0x40413a
mov esi, dword [esp + 0x14]
test edi, edi
jne 0x403fd3
xor eax, eax
inc eax
cmp word [0x409a40], ax
je 0x403fd3
cmp dword [0x408a20], 0
je 0x403fd3
test esi, esi
jne 0x403fdb
mov dword [esp + 0x24], eax
call fcn.00402143
test esi, esi
je 0x4040f8
cmp dword [0x408180], 0
je 0x404198
test esi, esi
je 0x4040f8
test byte [0x409a34], 4
je 0x4040f8
call fcn.00406739
mov ebx, eax
test ebx, ebx
je 0x40417f
mov esi, str.DoInfInstall
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
xor eax, eax
mov dword [esp + 0x14], edx
test edx, edx
je 0x404151
cmp dword [0x408a30], 0
mov edi, dword [esp + 0x10]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x90]
mov dword [esp + 0x38], eax
mov ax, word [0x409a40]
mov word [esp + 0x3c], ax
movzx eax, word [0x408a38]
mov dword [esp + 0x2c], 0x409154
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0x4091e4
mov dword [esp + 0x40], eax
je 0x404078
or eax, 0x10000
mov dword [esp + 0x40], eax
mov ecx, dword [0x409a34]
test cl, 8
je 0x40408c
or eax, 0x20000
mov dword [esp + 0x40], eax
test cl, 0x10
je 0x40409a
or eax, 0x40000
mov dword [esp + 0x40], eax
mov ecx, dword [0x408d48]
test cl, 0x40
je 0x4040ae
or eax, 0x80000
mov dword [esp + 0x40], eax
test cl, cl
jns 0x4040bb
or eax, 0x100000
mov dword [esp + 0x40], eax
mov eax, dword [0x409a38]
mov esi, esp
mov dword [esp + 0x44], eax
mov ecx, edx
lea eax, [esp + 0x28]
push eax
call dword [0x40a288]
call dword [esp + 0x18]
cmp esi, esp
je 0x4040e2
mov ecx, 4
int 0x29
mov dword [0x409124], eax
push ebx
test eax, eax
js 0x40412d
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [esp + 0x1c]
jmp 0x40410b
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x48]
mov ecx, edi
call fcn.004041e2
test eax, eax
je 0x404133
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, 2
jae 0x4041c4
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
jmp 0x403de7
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.00406ff0
mov esp, ebp
pop ebp
ret
push eax
push 0x10
push eax
push esi
mov edx, 0x4c9
xor ecx, ecx
call fcn.004046c7
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00406512
mov dword [0x409124], eax
jmp 0x40413a
xor eax, eax
mov edx, 0x4c8
push eax
push 0x10
push eax
push 0x4011f0
xor ecx, ecx
call fcn.004046c7
jmp 0x404169
xor eax, eax
mov edx, 0x4c7
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.004046c7
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x409124], 0x8007042b
jmp 0x40413a
xor esi, esi
inc esi
cmp dword [0x408580], 0
je 0x4041d5
call fcn.00402371
mov eax, esi
jmp 0x40413c