Function at 0x4a82e8
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb7c
xor eax, eax
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 8]
test edx, edx
je 0x4a8306
mov ecx, dword [ebp + 8]
mov al, byte [ecx]
test al, al
jne 0x4a830d
xor eax, eax
jmp 0x4a85a4
push 0xc
push 0
lea edx, [ebp - 0x84]
push edx
call fcn.0066cc88
add esp, 0xc
mov dword [ebp - 0x84], 0xc
xor ecx, ecx
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], 1
push 0x400
lea eax, [ebp - 0x84]
push eax
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x10]
push ecx
call sub.KERNEL32.DLL_CreatePipe
test eax, eax
jne 0x4a835a
xor eax, eax
jmp 0x4a85a4
push 0x10
push 0
lea edx, [ebp - 0x34]
push edx
call fcn.0066cc88
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x78]
push ecx
call fcn.0066cc88
add esp, 0xc
mov dword [ebp - 0x78], 0x44
mov dword [ebp - 0x4c], 0x101
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
push 0xfffffffffffffff6
call sub.KERNEL32.DLL_GetStdHandle
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x38], edx
mov word [ebp - 0x48], 0
lea ecx, [ebp - 0x34]
push ecx
lea eax, [ebp - 0x78]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push dword [ebp + 8]
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x4a83cd
xor eax, eax
jmp 0x4a85a4
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_CloseHandle
test eax, eax
push 0x1388
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_WaitForSingleObject
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
test edx, edx
jne 0x4a8589
xor ecx, ecx
mov dword [ebp - 0x18], ecx
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0
lea edx, [ebp - 0x18]
push edx
push 0
push 0
push 0
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_PeekNamedPipe
test eax, eax
je 0x4a856c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jbe 0x4a856c
push 0x400
push 0
lea eax, [ebp - 0x484]
push eax
call fcn.0066cc88
add esp, 0xc
push 0
lea edx, [ebp - 0x1c]
push edx
push dword [ebp - 0x18]
lea ecx, [ebp - 0x484]
push ecx
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_ReadFile
test eax, eax
je 0x4a856c
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x4a855d
mov edx, dword [ebp - 0x20]
movsx ecx, byte [ebp + edx - 0x484]
cmp ecx, 0x3a
jne 0x4a855a
inc dword [ebp - 0x20]
jmp 0x4a849f
mov eax, dword [ebp - 0x20]
movsx edx, byte [ebp + eax - 0x484]
cmp edx, 0x21
jl 0x4a849c
mov ecx, dword [ebp - 0x20]
movsx eax, byte [ebp + ecx - 0x484]
cmp eax, 0x7e
jle 0x4a84aa
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
dec edx
mov ecx, dword [ebp - 0x20]
cmp edx, ecx
ja 0x4a847c
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
cmp eax, edx
jae 0x4a856c
mov ecx, dword [ebp - 0x20]
movsx eax, byte [ebp + ecx - 0x484]
cmp eax, 0x30
jl 0x4a84f4
mov edx, dword [ebp - 0x20]
movsx ecx, byte [ebp + edx - 0x484]
cmp ecx, 0x39
jg 0x4a84f4
lea eax, [ebp - 0x484]
mov edx, dword [ebp - 0x20]
add eax, edx
mov dword [ebp - 0x24], eax
push dword [ebp - 0x24]
call fcn.00674df8
pop ecx
mov dword [ebp - 0xc], eax
jmp 0x4a856c
mov ecx, dword [ebp - 0x20]
movsx eax, byte [ebp + ecx - 0x484]
cmp eax, 0x41
jl 0x4a8527
mov edx, dword [ebp - 0x20]
movsx ecx, byte [ebp + edx - 0x484]
cmp ecx, 0x5a
jg 0x4a8527
mov eax, dword [ebp - 0x20]
movsx edx, byte [ebp + eax - 0x484]
add edx, 0xffffffbf
mov dword [ebp - 0xc], edx
jmp 0x4a856c
mov ecx, dword [ebp - 0x20]
movsx eax, byte [ebp + ecx - 0x484]
cmp eax, 0x61
jl 0x4a856c
mov edx, dword [ebp - 0x20]
movsx ecx, byte [ebp + edx - 0x484]
cmp ecx, 0x7a
jg 0x4a856c
mov eax, dword [ebp - 0x20]
movsx edx, byte [ebp + eax - 0x484]
add edx, 0xffffff9f
mov dword [ebp - 0xc], edx
jmp 0x4a856c
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
dec ecx
mov eax, dword [ebp - 0x20]
cmp ecx, eax
ja 0x4a8463
mov edx, dword [ebp - 0xc]
test edx, edx
jne 0x4a8589
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_GetExitCodeProcess
test eax, eax
je 0x4a8589
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x14]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret