Function at 0x4037e0
Capabilities:
Create process on windows
Get common file path
Resolve function by parsing pe exports
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x446201
mov eax, dword fs:[0]
push eax
sub esp, 0x498
mov eax, dword [0x45cff0]
xor eax, esp
mov dword [esp + 0x494], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45cff0]
xor eax, esp
push eax
lea eax, [esp + 0x4ac]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x4bc]
mov eax, dword [esp + 0x4c0]
mov edi, dword [esp + 0x4c4]
mov ecx, dword [esp + 0x4c8]
mov edx, dword [esp + 0x4d8]
xor esi, esi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x4b4], esi
call fcn.004184b6
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40387d
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x4b4], 1
call fcn.004184b6
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x4038af
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ebx, ebp
mov byte [esp + 0x4b4], 2
call fcn.00403600
test eax, eax
je 0x403978
test ebp, ebp
jne 0x4038de
xor eax, eax
jmp 0x4038ec
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4038e3
sub eax, edx
push eax
push ebp
lea ecx, [esp + 0x24]
call fcn.00401520
mov ecx, dword [esp + 0x1c]
cmp dword [ecx - 0xc], 0
je 0x403978
lea esi, [esp + 0x1c]
call fcn.00403760
mov edx, esi
push edx
call fcn.0040eab0
add esp, 4
test eax, eax
jne 0x403970
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x4b4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403941
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x4b4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403969
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x403d3a
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x20], ebp
mov ebx, edi
call fcn.00403600
test eax, eax
je 0x4039d2
test edi, edi
jne 0x40398b
xor eax, eax
jmp 0x403999
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403990
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x20]
call fcn.00401520
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
je 0x4039d2
lea esi, [esp + 0x18]
call fcn.00403760
mov edx, esi
push edx
call fcn.0040eab0
add esp, 4
test eax, eax
je 0x403919
mov edi, dword [esp + 0x18]
mov dword [esp + 0x28], edi
push 0x3c
lea ecx, [esp + 0x3c]
push 0
push ecx
call fcn.00435880
add esp, 0xc
cmp dword [esp + 0x24], 0
mov dword [esp + 0x38], 0x3c
je 0x403a15
push 0x104
lea edx, [esp + 0x2a4]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x403a15
lea eax, [esp + 0x2a0]
mov dword [esp + 0x20], eax
test edi, edi
je 0x403a38
cmp byte [edi], 0
je 0x403a38
lea ecx, [esp + 0x3a4]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [esp + 0x4d4], 0
je 0x403ba0
cmp dword [esp + 0x14], 0
je 0x403ba0
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403a58
sub eax, edx
cmp eax, 0x104
jae 0x403ba0
mov eax, dword [esp + 0x14]
xor edx, edx
cmp byte [eax], 0x22
mov edi, eax
sete dl
mov ebp, edx
test ebp, ebp
je 0x403a85
inc edi
push 0x22
jmp 0x403a87
push 0x20
push edi
call fcn.00434ef0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403a9c
mov esi, ebx
sub esi, edi
jmp 0x403aac
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403aa1
sub eax, edx
mov esi, eax
push esi
lea ecx, [esp + 0x1a0]
push edi
push ecx
call fcn.00434950
add esp, 0xc
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x99]
push eax
push 0x104
lea ecx, [esp + 0x1a8]
push ecx
mov byte [esp + esi + 0x1ac], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x403ba0
test ebp, ebp
jne 0x403b15
lea edx, [esp + 0x95]
push 0x20
push edx
call fcn.00434ef0
add esp, 8
test eax, eax
jne 0x403b15
lea eax, [esp + 0x95]
mov dword [esp + 0x14], eax
jmp 0x403b42
lea edi, [esp + 0x94]
mov byte [esp + 0x94], 0x22
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403b25
mov cx, word [0x449858]
lea edx, [esp + 0x94]
mov word [edi], cx
mov dword [esp + 0x14], edx
test ebx, ebx
je 0x403ba0
cmp byte [ebx], 0x22
jne 0x403b51
inc ebx
cmp byte [ebx], 0
je 0x403ba0
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403b58
sub eax, edx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403b68
sub eax, esi
lea eax, [eax + edx + 1]
push eax
lea ecx, [esp + 0x30]
call fcn.00403650
test al, al
je 0x403ba0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
push ebx
push ecx
push str._s_s
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x4cc]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x4d0]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x24]
mov eax, 0x10c
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x50], 0
mov dword [esp + 0x44], ecx
test esi, esi
jne 0x403c01
test ecx, ecx
je 0x403c01
push str.open
push ecx
call fcn.00435440
add esp, 8
test eax, eax
jne 0x403c18
mov eax, dword [esp + 0x3c]
and eax, 0xfffffff3
mov dword [esp + 0x3c], eax
test esi, esi
je 0x403c18
and eax, 0xfffffeff
or eax, 0x40
mov dword [esp + 0x3c], eax
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov ebp, eax
test ebp, ebp
je 0x403cbe
test esi, esi
je 0x403cbe
cmp dword [esp + 0x70], 0
je 0x403cbe
mov ebx, dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x7c]
push eax
push 1
call ebx
test eax, eax
je 0x403cb3
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
push 3
push 0
push 0
push 0
lea ecx, [esp + 0x88]
push ecx
call esi
test eax, eax
je 0x403c9d
mov edi, edi
lea edx, [esp + 0x78]
push edx
call edi
push 3
push 0
push 0
push 0
lea eax, [esp + 0x88]
push eax
call esi
test eax, eax
jne 0x403c80
push 0xff
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x7c]
push ecx
push 1
call ebx
test eax, eax
jne 0x403c68
mov edx, dword [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x403cd9
cmp byte [eax], 0
je 0x403cd9
lea eax, [esp + 0x3a4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x4b4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x4b4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d29
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x403d38
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, ebp
mov ecx, dword [esp + 0x4ac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x494]
xor ecx, esp
call fcn.00434d81
add esp, 0x4a4
ret