Function at 0x4a14f0
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
push edi
push 0
push 0
push str.COMSPEC
call ebx
mov esi, eax
test esi, esi
je 0x4a1867
add eax, 3
and al, 0xfc
call fcn.004bc9d0
mov edi, esp
push esi
push edi
push str.COMSPEC
mov dword [ebp - 4], edi
call ebx
test eax, eax
je 0x4a187b
lea ebx, [eax + edi]
cmp ebx, edi
jb 0x4a1548
cmp byte [ebx], 0x5c
je 0x4a1548
dec ebx
cmp ebx, edi
jae 0x4a153e
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x4a15cd
inc ebx
push str.command.com
push ebx
call fcn.004c0310
add esp, 8
test eax, eax
je 0x4a15cd
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.__c
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add esi, edx
lea ebx, [ecx + esi + 1]
mov eax, ebx
add eax, 3
and al, 0xfc
call fcn.004bc9d0
mov ecx, ebx
mov esi, esp
mov edx, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
push eax
push str.__c
push ecx
push str._s_s_s
push ebx
push esi
call fcn.004824d0
add esp, 0x18
jmp 0x4a17a3
lea edx, [ebp - 0x15c]
push 0x104
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov al, byte [ebp - 0x15c]
xor ecx, ecx
xor esi, esi
test al, al
je 0x4a1616
mov edx, 1
lea edi, [ebp - 0x15c]
sub edx, edi
cmp al, 0x5c
jne 0x4a160a
lea eax, [edx + esi]
lea ecx, [ebp + eax - 0x15c]
mov al, byte [ebp + esi - 0x15b]
inc esi
test al, al
jne 0x4a15fc
mov byte [ebp + ecx - 0x15c], 0
lea edi, [ebp - 0x15c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, 0x104
sub edx, ecx
lea eax, [ebp - 0x15c]
push edx
push str.w9xpopen.exe
push eax
call fcn.004c01e0
lea ecx, [ebp - 0x180]
lea edx, [ebp - 0x15c]
push ecx
push edx
call fcn.004c8954
add esp, 0x14
test eax, eax
je 0x4a171b
push 0x104
call fcn.0047f710
push eax
lea eax, [ebp - 0x15c]
push eax
call fcn.004bba60
lea edi, [ebp - 0x15c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x15d], 0x5c
je 0x4a16b1
lea edi, [ebp - 0x15c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov cx, word [0x4fdcc4]
mov word [edi - 1], cx
lea edi, [ebp - 0x15c]
or ecx, 0xffffffff
xor eax, eax
mov edx, 0x104
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x15c]
sub edx, ecx
push edx
push str.w9xpopen.exe
push eax
call fcn.004c01e0
lea ecx, [ebp - 0x180]
lea edx, [ebp - 0x15c]
push ecx
push edx
call fcn.004c8954
add esp, 0x14
test eax, eax
je 0x4a171b
mov eax, dword [0x52d200]
push str.w9xpopen.exe
push str.Can_not_locate__s_which_is_needed_for_popen_to_work_with_your_shell_or_platform.
push eax
call fcn.0043f8b0
add esp, 0xc
xor eax, eax
lea esp, [ebp - 0x18c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.w9xpopen.exe
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.__c
add edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebp - 0x15c]
mov ebx, ecx
or ecx, 0xffffffff
add ebx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebx, edx
lea ebx, [ecx + ebx + 2]
mov eax, ebx
add eax, 3
and al, 0xfc
call fcn.004bc9d0
mov ecx, ebx
mov esi, esp
mov edx, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [ebp - 0x15c]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
push eax
push str.__c
push ecx
push edx
push str._s___s_s_s_
push ebx
push esi
call fcn.004824d0
add esp, 0x1c
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x58]
mov edx, dword [ebp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x58]
push eax
push ecx
push 0
push 0
push 0x10
push 1
push 0
push 0
push esi
push 0
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0x2c], 0x101
mov dword [ebp - 0x18], edx
mov word [ebp - 0x28], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4a181a
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov eax, 1
lea esp, [ebp - 0x18c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004be6ee
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
call fcn.004be6ee
test esi, esi
je 0x4a184d
mov edx, dword [eax]
push esi
push edx
call fcn.0043f840
add esp, 8
xor eax, eax
lea esp, [ebp - 0x18c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax]
push eax
call fcn.0043f820
add esp, 4
xor eax, eax
lea esp, [ebp - 0x18c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x52d200]
push str.Cannot_locate_a_COMSPEC_environment_variable_to_use_as_the_shell
push ecx
call fcn.0043f0c0
add esp, 8
xor eax, eax
lea esp, [ebp - 0x18c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret