Function at 0x4050c0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4249bd
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x430040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x70], edx
mov ebx, ecx
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x405170
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x405169
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x405169
mov ecx, dword [eax + 0x78]
mov dword [ebp - 0x74], ecx
test ecx, ecx
je 0x405169
mov edx, dword [ecx + esi + 0x24]
xor edi, edi
mov eax, dword [ecx + esi + 0x20]
add edx, esi
mov dword [ebp - 0x7c], edx
add eax, esi
mov edx, dword [ecx + esi + 0x1c]
add edx, esi
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x6c], edx
cmp dword [ecx + esi + 0x18], edi
jbe 0x405169
mov eax, dword [eax + edi*4]
add eax, esi
push str.ShellExecuteExW
push eax
call fcn.0041249c
add esp, 8
test eax, eax
je 0x40518e
mov eax, dword [ebp - 0x74]
inc edi
cmp edi, dword [eax + esi + 0x18]
mov eax, dword [ebp - 0x78]
jb 0x405145
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040bdf4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x6c]
movzx eax, word [eax + edi*2]
mov eax, dword [ecx + eax*4]
lea edi, [eax + esi]
test edi, edi
je 0x405169
mov ecx, dword [ebx + 0x10]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 3
jb 0x4052d1
cmp dword [ebx + 0x14], 7
jbe 0x4051bd
mov ebx, dword [ebx]
push ecx
push ebx
push 3
push 0x42cbbc
push ecx
push dword [ebp - 0x70]
lea ecx, [ebp - 0x2c]
call fcn.0040a7b0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 7
xorps xmm0, xmm0
movlpd qword [ebp - 0x48], xmm0
cmova eax, dword [ebp - 0x2c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x70]
movlpd qword [ebp - 0x40], xmm0
movlpd qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], 0
cmp dword [eax + 0x14], 7
mov dword [ebp - 0x68], 0x3c
mov dword [ebp - 0x64], 0x140
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], str.open
mov dword [ebp - 0x58], str.cmd.exe
jbe 0x40522e
mov eax, dword [eax]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x68]
push eax
mov dword [ebp - 0x4c], 0
call edi
test eax, eax
je 0x405273
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x405273
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x30]
test eax, eax
jne 0x4052aa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor bl, bl
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x4052ca
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4052c0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4052d6
jmp 0x4052c0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x14], 0
sete bl
jmp 0x40527c
push ecx
push edx
call fcn.0040c034
add esp, 8
mov al, bl
jmp 0x405172
call fcn.00401240
call fcn.004127c5
int3