Function at 0x100520d0
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 0x100b06f0
mov eax, dword fs:[0]
push eax
mov eax, 0x107c
call fcn.100759e0
mov eax, dword [0x100de514]
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 0x100521a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._RunSysCommand__Fail_to_Create_pipe__error_code:
push 0x100e0c70
call fcn.1004d150
add esp, 8
mov ecx, eax
call fcn.1004e920
push eax
call fcn.1004dbb0
add esp, 4
jmp 0x10052431
cmp dword [ebp + 0x20], 8
lea esi, [ebp + 0xc]
cmovae esi, dword [ebp + 0xc]
call fcn.1000ac40
mov ecx, eax
test ecx, ecx
je 0x10052485
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 0x10052203
test esi, 0xffff0000
jne 0x100521ed
movzx eax, si
lea ecx, [ebp - 0x1014]
push eax
call fcn.1000baf0
jmp 0x10052212
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100521f2
sub ecx, edx
sar ecx, 1
jmp 0x10052205
xor ecx, ecx
push ecx
push esi
lea ecx, [ebp - 0x1014]
call fcn.10017410
push 0x40
lea eax, [ebp - 0x1084]
mov byte [ebp - 4], 3
push 0
push eax
mov dword [ebp - 0x1088], 0x44
call fcn.100805f0
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 0x10052295
push 0x400
lea ecx, [ebp - 0x1014]
call fcn.1000c240
mov esi, dword [ebp - 0x1014]
cmp dword [esi - 8], 0x400
jl 0x1005248f
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 0x10052302
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._RunSysCommand__Fail_to_Create_Process__error_code:
push 0x100e0c70
call fcn.1004d150
add esp, 8
mov ecx, eax
call fcn.1004e920
push eax
call fcn.1004dbb0
add esp, 4
push dword [esi - 8]
push esi
call fcn.100839ad
add esp, 8
test eax, eax
js 0x1005248f
cmp eax, dword [esi - 8]
jg 0x1005248f
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.100805f0
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 0x10052380
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 0x10052409
nop
lea ecx, [ebp - 0x1010]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100523d0
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 0x100523c0
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 0x10052431
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x20]
cmp edx, 8
jb 0x10052467
mov ecx, dword [ebp + 0xc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1005245d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052499
push edx
push ecx
call fcn.1007559a
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.1007590b
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.1000a5d0
push 0x80070057
call fcn.1000a5d0
call fcn.10083519
int3