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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call fcn.004055dd
cmp byte [ebp + 0xc], bl
je 0x405ac2
cmp dword [0x40c4bc], ebx
je 0x405f68
call fcn.00405583
cmp dword [0x40c4d4], ebx
je 0x405f68
mov eax, dword [0x40c4d8]
cmp eax, ebx
je 0x405f68
push ebx
call eax
test eax, eax
jl 0x405f68
lea eax, [ebp - 4]
push eax
push 0x40a894
push 1
push ebx
push 0x40a884
call dword [0x40c4d4]
test eax, eax
jl 0x405f68
push esi
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.004045de
lea eax, [ebp - 0x50]
push eax
call fcn.004045de
lea eax, [ebp - 0x40]
push eax
call fcn.004045de
lea eax, [ebp - 0x1c]
push eax
call fcn.004045de
lea eax, [ebp - 0x30]
push eax
call fcn.004045de
lea eax, [ebp - 0x70]
push eax
call fcn.004045de
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
push 0x40a874
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x405f0e
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
push ebx
push dword [edx + 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x405f0e
mov edi, 0x8007007a
mov eax, dword [ebp - 0x34]
mov esi, eax
shl esi, 2
cmp esi, ebx
jne 0x405b89
mov esi, 0x400
lea eax, [ebp - 0x40]
push eax
call fcn.004045f2
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
push dword [ebp - 0x34]
mov eax, dword [ebp - 4]
push dword [ebp - 0x3c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
cmp eax, edi
je 0x405b78
mov eax, dword [ebp - 0x44]
mov esi, eax
shl esi, 2
cmp esi, ebx
jne 0x405bc8
mov esi, 0x400
lea eax, [ebp - 0x50]
push eax
call fcn.004045f2
lea eax, [ebp - 0x50]
push esi
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
push dword [ebp - 0x44]
mov eax, dword [ebp - 4]
push dword [ebp - 0x4c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
cmp eax, edi
je 0x405bb7
mov eax, dword [ebp - 0x54]
mov esi, eax
shl esi, 2
cmp esi, ebx
jne 0x405c07
mov esi, 0x400
lea eax, [ebp - 0x60]
push eax
call fcn.004045f2
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
mov eax, dword [ebp - 4]
push ebx
push ebx
push dword [ebp - 0x54]
mov ecx, dword [eax]
push dword [ebp - 0x5c]
push eax
call dword [ecx + 0xc]
cmp eax, edi
je 0x405bf6
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
test eax, eax
jne 0x405f0e
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
push ebx
push dword [ebp - 0x5c]
call esi
cmp eax, ebx
je 0x405f0e
inc eax
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
push dword [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x5c]
call esi
push ebx
push ebx
push dword [ebp - 0x4c]
mov dword [ebp - 0x14], eax
call esi
cmp eax, ebx
je 0x405f0e
inc eax
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
push dword [ebp - 0x4c]
call esi
push ebx
push ebx
push dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
call esi
cmp eax, ebx
je 0x405f0e
inc eax
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.0040460d
test eax, eax
je 0x405f0e
push dword [ebp - 0x64]
push dword [ebp - 0x6c]
push dword [ebp - 0x3c]
call esi
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040465a
lea eax, [ebp - 0x30]
push eax
call fcn.0040465a
lea eax, [ebp - 0x70]
push eax
call fcn.0040465a
cmp byte [ebp + 0xc], bl
jne 0x405e83
lea eax, [ebp - 0x1c]
push 0x2e
push eax
call fcn.0040485f
mov esi, eax
cmp esi, ebx
je 0x405e83
lea eax, [ebp - 0xa0]
push eax
call fcn.004045de
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x9c], esi
sub esi, dword [ebp - 0x18]
push str..exe
sar esi, 1
sub eax, esi
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0xa0]
push eax
call fcn.004046f5
test eax, eax
je 0x405d6b
lea eax, [ebp - 0xa0]
push str..com
push eax
call fcn.004046f5
test eax, eax
jne 0x405e83
lea eax, [ebp - 0x90]
push eax
call fcn.004045de
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x90]
push eax
push esi
call fcn.00406d87
test eax, eax
jne 0x405d94
mov eax, dword [esi + 4]
mov dword [ebp - 0x8c], eax
push 0x44
lea eax, [ebp - 0xe4]
pop esi
push esi
push ebx
push eax
call fcn.00404528
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0xe4], esi
mov dword [ebp - 0xd8], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0xb8], 0x800
call fcn.00407891
mov ecx, dword [ebp - 0x28]
mov byte [ebp + 0xb], al
mov eax, dword [ebp - 0x14]
cmp byte [ebp + 0xb], bl
lea eax, [ecx + eax + 2]
je 0x405dde
inc eax
inc eax
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040460d
test eax, eax
jne 0x405dfd
lea eax, [ebp - 0x90]
push eax
call fcn.004045f2
jmp 0x405f0e
cmp byte [ebp + 0xb], bl
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
je 0x405e11
push str.__y___y
jmp 0x405e16
push str._y__y
push dword [ebp - 0x7c]
call fcn.004052d2
add esp, 0x10
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0xe4]
push eax
push dword [ebp - 0x6c]
push ebx
push 0x4000210
push ebx
push ebx
push ebx
push dword [ebp - 0x7c]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x405e65
push dword [ebp - 0xf4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xf0]
call esi
lea eax, [ebp - 0x80]
push eax
call fcn.004045f2
lea eax, [ebp - 0x90]
push eax
call fcn.004045f2
cmp dword [ebp - 8], ebx
jne 0x405f0e
push 0x3c
lea eax, [ebp - 0xdc]
pop esi
push esi
push ebx
push eax
call fcn.00404528
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0xc0], eax
mov eax, dword [0x40c4bc]
mov dword [ebp - 0xdc], esi
mov esi, dword [ebp - 0x6c]
cmp eax, ebx
mov dword [ebp - 0xd8], 0x804400
mov dword [ebp - 0xcc], ecx
mov dword [ebp - 0xc8], edx
mov dword [ebp - 0xc4], esi
je 0x405eef
cmp byte [ebp + 0xc], bl
je 0x405ee0
mov dword [ebp - 0xd0], str.runas
lea ecx, [ebp - 0xdc]
push ecx
call eax
test eax, eax
je 0x405f0e
jmp 0x405f07
mov eax, dword [0x40c4c0]
cmp eax, ebx
je 0x405f0e
push dword [ebp - 0x20]
push esi
push edx
push ecx
push ebx
push ebx
call eax
cmp eax, 0x20
jbe 0x405f0e
mov dword [ebp - 8], 1
lea eax, [ebp - 0x60]
push eax
call fcn.004045f2
lea eax, [ebp - 0x40]
push eax
call fcn.004045f2
lea eax, [ebp - 0x50]
push eax
call fcn.004045f2
lea eax, [ebp - 0x1c]
push eax
call fcn.004045f2
lea eax, [ebp - 0x70]
push eax
call fcn.004045f2
lea eax, [ebp - 0x30]
push eax
call fcn.004045f2
mov eax, dword [ebp - 0xc]
pop edi
cmp eax, ebx
pop esi
je 0x405f56
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x405f63
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 8]
jmp 0x405f6a
xor eax, eax
pop ebx
leave
ret 8