Function at 0x4937d0
Capabilities:
Create pipe
Create process on windows
Create two anonymous pipes
Read file on windows
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x14a0
call fcn.005965e0
mov eax, dword [0x601018]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1444], eax
mov eax, dword [ebp + 0x10]
push str.gswin32c.exe
mov esi, 0x400
lea edi, [ebp - 0x80c]
mov dword [ebp - 0x1414], ecx
mov dword [ebp - 0x143c], ebx
mov dword [ebp - 0x1410], edx
mov dword [ebp - 0x1440], eax
call fcn.004f9520
mov ecx, edi
push ecx
push ebx
push 0x5c87bc
lea edi, [ebp - 0x140c]
call fcn.004f9520
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
xor ebx, ebx
add esp, 0x10
push ebx
lea edx, [ebp - 0x1438]
push edx
lea eax, [ebp - 0x141c]
push eax
lea ecx, [ebp - 0x1418]
mov edi, 0xc
push ecx
mov dword [ebp - 0x1420], ebx
mov dword [ebp - 0x1428], ebx
mov dword [ebp - 0x1418], ebx
mov dword [ebp - 0x141c], ebx
mov dword [ebp - 0x1438], edi
mov dword [ebp - 0x1430], 1
mov dword [ebp - 0x1434], ebx
call esi
test eax, eax
jne 0x4938c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x1414]
push eax
push str.failed_to_create_output_pipe__error_d
mov edi, 0x13b5c
call fcn.004526c0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00596083
mov esp, ebp
pop ebp
ret
push ebx
lea edx, [ebp - 0x1438]
push edx
lea eax, [ebp - 0x1428]
push eax
lea ecx, [ebp - 0x1420]
push ecx
mov dword [ebp - 0x1420], ebx
mov dword [ebp - 0x1428], ebx
mov dword [ebp - 0x1438], edi
mov dword [ebp - 0x1430], 1
mov dword [ebp - 0x1434], ebx
call esi
test eax, eax
jne 0x493956
mov eax, dword [ebp - 0x1418]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x493917
push eax
call esi
mov eax, dword [ebp - 0x141c]
cmp eax, ebx
je 0x493924
push eax
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x1414]
push eax
push str.failed_to_create_input_pipe__error_d
mov edi, 0x13b5d
call fcn.004526c0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00596083
mov esp, ebp
pop ebp
ret
push 0x44
lea edx, [ebp - 0x149c]
push ebx
push edx
mov dword [ebp - 0x1424], ebx
mov dword [ebp - 0x142c], ebx
call sub.MSVCR100.dll_memset
xor eax, eax
mov dword [ebp - 0x1454], eax
mov dword [ebp - 0x1450], eax
mov dword [ebp - 0x144c], eax
mov dword [ebp - 0x1448], eax
mov eax, dword [ebp - 0x1414]
mov ecx, dword [eax + 0x844]
add esp, 0xc
push 0x60ed48
call fcn.004fc850
mov ecx, dword [ebp - 0x1410]
mov esi, 0x400
lea edi, [ebp - 0x40c]
push ecx
test eax, eax
js 0x4939e2
mov edx, dword [ebp - 0x1444]
push 0x5cc7f4
add edx, 0x286f7c
push edx
lea eax, [ebp - 0x80c]
push eax
push str._s__q__dNODISPLAY__dSAFER__dDELAYBIND__dWRITESYSTEMDICT__ps2ascii.ps___s_sheader.ps____s___c_quit
call fcn.004f9520
add esp, 0x14
jmp 0x4939f6
lea edx, [ebp - 0x80c]
push edx
push str._s__q__dNODISPLAY__dSAFER__dDELAYBIND__dWRITESYSTEMDICT__ps2ascii.ps___s___c_quit
call fcn.004f9520
add esp, 0xc
mov edi, dword [ebp - 0x143c]
mov edx, dword [ebp - 0x1420]
mov eax, 0x400
mov dword [ebp - 0x147c], eax
mov dword [ebp - 0x1478], eax
xor eax, eax
mov word [ebp - 0x146c], ax
mov eax, dword [ebp - 0x141c]
lea ecx, [ebp - 0x40c]
mov dword [ebp - 0x1460], eax
mov dword [ebp - 0x145c], eax
lea eax, [ebp - 0x1454]
push eax
mov dword [ebp - 0x1490], ecx
lea ecx, [ebp - 0x149c]
push ecx
push edi
push ebx
push 0x30
push 1
push ebx
mov dword [ebp - 0x1464], edx
push ebx
lea edx, [ebp - 0x40c]
push edx
push ebx
mov dword [ebp - 0x149c], 0x44
mov dword [ebp - 0x1470], 0x119
mov dword [ebp - 0x1474], 0xf0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
mov eax, dword [ebp - 0x1420]
cmp eax, ebx
je 0x493a95
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1428]
cmp eax, ebx
je 0x493aa6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x141c]
cmp eax, ebx
je 0x493ab7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x493ac3
mov dword [ebp - 0x1410], ebx
jmp 0x493b13
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [ebp - 0x1410], eax
push edi
lea eax, [ebp - 0x40c]
push eax
push str.failed_to_call_CreateProcess__:_command___s____cwd___s____error___d__
mov esi, 0x400
lea edi, [ebp - 0xc0c]
call fcn.004f9520
mov ecx, dword [ebp - 0x1410]
mov esi, dword [ebp - 0x1414]
push ecx
lea edx, [ebp - 0x40c]
push edx
push str.failed__to_call_CreateProcess___for_command____s____error____d__
mov edi, 0x13b5e
call fcn.004526c0
add esp, 0x1c
mov edi, dword [ebp - 0x1440]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x493b67
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x1414]
push eax
push edi
push str.failed_to_create_output_file__s___error_d
mov edi, 0x13b5e
call fcn.004526c0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
mov dword [ebp - 0x1410], edi
jmp 0x493c1a
cmp dword [ebp - 0x1410], ebx
jne 0x493be8
mov edx, dword [ebp - 0x1418]
push ebx
lea eax, [ebp - 0x1424]
push eax
push 0x400
lea ecx, [ebp - 0x100c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x493c11
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, edi
mov eax, dword [ebp - 0x1424]
cmp eax, ebx
je 0x493c11
push ebx
lea ecx, [ebp - 0x142c]
push ecx
push eax
lea edx, [ebp - 0x100c]
push edx
push esi
call edi
test eax, eax
je 0x493c11
mov edx, dword [ebp - 0x1418]
push ebx
lea eax, [ebp - 0x1424]
push eax
push 0x400
lea ecx, [ebp - 0x100c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x493ba0
jmp 0x493c11
lea eax, [ebp - 0xc0c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x493bf1
push ebx
lea ecx, [ebp - 0x142c]
push ecx
sub eax, edx
push eax
lea edx, [ebp - 0xc0c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp - 0x1418]
cmp eax, ebx
je 0x493c27
push eax
call esi
mov eax, dword [ebp - 0x1454]
push eax
call esi
mov ecx, dword [ebp - 0x1450]
push ecx
call esi
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x1410]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00596083
mov esp, ebp
pop ebp
ret