Function at 0x52be5c
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 eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x52be65
mov eax, dword [ebp - 4]
add esp, 0xffffffc4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2040], ebx
mov dword [ebp - 0x203c], ebx
mov dword [ebp - 0x2038], ebx
mov dword [ebp - 0x2034], ebx
mov dword [ebp - 0x18], ebx
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004052c8
xor eax, eax
push ebp
push 0x52c15c
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x24]
xor ecx, ecx
mov edx, 0xc
call fcn.0040379c
mov dword [ebp - 0x24], 0xc
mov dword [ebp - 0x1c], 0xffffffff
xor eax, eax
mov dword [ebp - 0x20], eax
push 0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.kernel32.dll_CreatePipe
lea edx, [ebp - 0x2034]
mov eax, dword [0x587abc]
mov eax, dword [eax]
call fcn.0048623c
mov eax, dword [ebp - 0x2034]
lea edx, [ebp - 0x18]
call fcn.0040abcc
lea eax, [ebp - 0x2020]
xor ecx, ecx
mov edx, 0x44
call fcn.0040379c
mov dword [ebp - 0x2020], 0x44
mov dword [ebp - 0x1ff4], 0x101
mov word [ebp - 0x1ff0], bx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1fe4], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1fe0], eax
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0x2020]
push eax
mov eax, dword [ebp - 0x18]
call fcn.004052d8
push eax
push 0
push 0x20
push 0xffffffffffffffff
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 4]
call fcn.004052d8
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x52bf8b
mov dword [ebp - 8], 0xffffffff
jmp 0x52c12e
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov ebx, eax
mov eax, esi
call fcn.00404e08
jmp 0x52c0d2
lea eax, [ebp - 0x1fdc]
xor ecx, ecx
mov edx, 0x1fb8
call fcn.0040379c
push 0
lea eax, [ebp - 0x14]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x1fdc]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
mov ebx, eax
lea eax, [ebp - 0x2038]
lea edx, [ebp - 0x1fdc]
mov ecx, 0x1fb8
call fcn.00405088
mov edx, dword [ebp - 0x2038]
mov eax, esi
call fcn.004050e0
cmp dword [0x5894d4], 0
je 0x52c058
xor eax, eax
push ebp
push 0x52c049
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2030]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x2030]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x202c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x52c0da
lea eax, [ebp - 0x203c]
lea edx, [ebp - 0x1fdc]
mov ecx, 0x1fb8
call fcn.00405088
mov eax, dword [ebp - 0x203c]
call fcn.00510238
test eax, eax
jle 0x52c08f
mov edx, dword [0x5894d0]
mov edx, dword [edx + 0x328]
xchg edx, eax
call fcn.0044a2c0
lea eax, [ebp - 0x2040]
lea edx, [ebp - 0x1fdc]
mov ecx, 0x1fb8
call fcn.00405088
mov eax, dword [ebp - 0x2040]
call fcn.0050fde4
test eax, eax
jle 0x52c0c6
mov edx, dword [0x5894d0]
mov edx, dword [edx + 0x328]
xchg edx, eax
call fcn.0044a2d0
mov eax, dword [0x587abc]
mov eax, dword [eax]
call fcn.004859c0
test ebx, ebx
jne 0x52bfa2
cmp dword [0x5894d4], 0
jne 0x52c12e
mov eax, dword [0x587abc]
mov eax, dword [eax]
call fcn.004859c0
push 0xffffffffffffffff
mov eax, dword [ebp - 0x2030]
push eax
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2030]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x2030]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x202c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52c163
lea eax, [ebp - 0x2040]
mov edx, 4
call fcn.00404e2c
lea eax, [ebp - 0x18]
call fcn.00404e08
lea eax, [ebp - 4]
call fcn.00404e08
ret