Function at 0x402060
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414566
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x70
mov eax, dword [0x41d008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
test ecx, ecx
mov dword [ebp - 4], 1
mov edx, 0x8000000
mov eax, 0x10
cmove eax, edx
mov dword [ebp - 0x7c], eax
call fcn.00401150
mov ecx, eax
test ecx, ecx
je 0x4022a7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x4020fb
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00402c20
mov esi, dword [ebp - 0x18]
cmp dword [esi - 8], 0x104
jl 0x4022b1
push 0x104
mov dword [esi - 0xc], 0x104
xor eax, eax
push esi
mov word [esi + 0x208], ax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esi - 8]
push esi
call fcn.004071d3
add esp, 8
test eax, eax
js 0x4022b1
cmp eax, dword [esi - 8]
jg 0x4022b1
xor ecx, ecx
mov dword [esi - 0xc], eax
push 0x5c
push esi
mov word [esi + eax*2], cx
mov dword [ebp - 0x1c], ecx
call fcn.00404d74
add esp, 8
test eax, eax
jne 0x402164
or eax, 0xffffffff
jmp 0x402168
sub eax, esi
sar eax, 1
inc eax
lea ecx, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004023e0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x18]
push dword [ebx + 0xc]
push 0x41abc8
push eax
call fcn.00402cc0
add esp, 0xc
lea eax, [ebp - 0x68]
push 0x44
push 0
push eax
call fcn.004050a0
mov edi, dword [ebp - 0x1c]
xorps xmm0, xmm0
add esp, 0xc
mov dword [ebp - 0x68], 0x44
movups xmmword [ebp - 0x78], xmm0
cmp dword [edi - 4], 1
jle 0x4021c3
push dword [edi - 0xc]
lea ecx, [ebp - 0x1c]
call fcn.004027a0
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
cmp dword [esi - 4], 1
jle 0x4021da
push dword [esi - 0xc]
lea ecx, [ebp - 0x18]
call fcn.004027a0
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x68]
push eax
push edi
push 0
push dword [ebp - 0x7c]
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402201
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [edi - 0x10]
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402231
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40224c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebx + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40226a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebx + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x402289
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00403334
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x80004005
call fcn.00403200
push 0x80070057
call fcn.00403200
int3