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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100b0f50
mov eax, dword fs:[0]
push eax
mov eax, 0x107c
call fcn.100761a0
mov eax, dword [0x100df514]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1034], edi
mov dword [ebp - 0x1024], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov dword [ebp - 4], 1
mov byte [edi], 0
push 0
lea eax, [ebp - 0x1030]
mov dword [ebp - 0x1024], 1
push eax
lea eax, [ebp - 0x101c]
mov dword [ebp - 0x1030], 0xc
push eax
lea eax, [ebp - 0x1018]
mov dword [ebp - 0x102c], 0
push eax
mov dword [ebp - 0x1028], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x10052944
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._RunSysCommand__Fail_to_Create_pipe__error_code:
push 0x100e1c98
call fcn.1004d8f0
add esp, 8
mov ecx, eax
call fcn.1004f0c0
push eax
call fcn.1004e350
add esp, 4
jmp 0x10052bd1
cmp dword [ebp + 0x20], 8
lea esi, [ebp + 0xc]
cmovae esi, dword [ebp + 0xc]
call fcn.1000ac40
mov ecx, eax
test ecx, ecx
je 0x10052c25
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1014], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x100529a3
test esi, 0xffff0000
jne 0x1005298d
movzx eax, si
lea ecx, [ebp - 0x1014]
push eax
call fcn.1000baf0
jmp 0x100529b2
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10052992
sub ecx, edx
sar ecx, 1
jmp 0x100529a5
xor ecx, ecx
push ecx
push esi
lea ecx, [ebp - 0x1014]
call fcn.100176a0
push 0x40
lea eax, [ebp - 0x1084]
mov byte [ebp - 4], 3
push 0
push eax
mov dword [ebp - 0x1088], 0x44
call fcn.10080db0
add esp, 0xc
lea eax, [ebp - 0x1088]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov esi, dword [ebp - 0x1014]
xor eax, eax
mov word [ebp - 0x1058], ax
mov ecx, 1
mov eax, dword [ebp - 0x101c]
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x104c], eax
mov dword [ebp - 0x105c], 0x101
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x10052a35
push 0x400
lea ecx, [ebp - 0x1014]
call fcn.1000c240
mov esi, dword [ebp - 0x1014]
cmp dword [esi - 8], 0x400
jl 0x10052c2f
xor eax, eax
mov dword [esi - 0xc], 0x400
mov word [esi + 0x800], ax
lea eax, [ebp - 0x1044]
push eax
lea eax, [ebp - 0x1088]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x10052aa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._RunSysCommand__Fail_to_Create_Process__error_code:
push 0x100e1c98
call fcn.1004d8f0
add esp, 8
mov ecx, eax
call fcn.1004f0c0
push eax
call fcn.1004e350
add esp, 4
push dword [esi - 8]
push esi
call fcn.1008416d
add esp, 8
test eax, eax
js 0x10052c2f
cmp eax, dword [esi - 8]
jg 0x10052c2f
mov dword [esi - 0xc], eax
xor ecx, ecx
push 0x7530
mov word [esi + eax*2], cx
push dword [ebp - 0x1044]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1044]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [ebp - 0x1040]
call ebx
push dword [ebp - 0x101c]
call ebx
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.10080db0
lea ecx, [ebp - 0x1010]
mov dword [ebp - 0x1020], 0
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10052b20
sub ecx, edx
lea eax, [ebp - 0x1010]
push ecx
push eax
mov ecx, edi
call fcn.1000eb90
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1020]
push 0
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1018]
call ebx
test eax, eax
je 0x10052ba9
nop
lea ecx, [ebp - 0x1010]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10052b70
sub ecx, edx
lea eax, [ebp - 0x1010]
push ecx
push eax
mov ecx, edi
call fcn.1000e880
push 0
lea eax, [ebp - 0x1020]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1018]
call ebx
test eax, eax
jne 0x10052b60
push dword [ebp - 0x1018]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10052bd1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x20]
cmp edx, 8
jb 0x10052c07
mov ecx, dword [ebp + 0xc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10052bfd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052c39
push edx
push ecx
call fcn.10075d5a
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100760cb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.1000a5d0
push 0x80070057
call fcn.1000a5d0
call fcn.10083cd9
int3