Function at 0x524530
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 0x6ae9bd
mov eax, dword fs:[0]
push eax
mov eax, 0x16b4
call fcn.00666cc0
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 0xc], 0
jl 0x52456b
cmp dword [ebp + 0xc], 1
jle 0x524597
mov eax, dword [ebp + 0xc]
push eax
push str.get_runthos_info_param_fail._type_d_r_n
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, 4
jmp 0x524b3a
push 0x7554a7
mov ecx, dword [ebp + 8]
call fcn.0040dc60
mov dword [ebp - 0x128c], 0
mov dword [ebp - 0x1220], 0xc
mov dword [ebp - 0x121c], 0
mov dword [ebp - 0x1218], 1
push 0
lea ecx, [ebp - 0x1220]
push ecx
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x52460f
push 0x75a968
call fcn.0066610b
add esp, 4
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, 1
jmp 0x524b3a
push 0x1000
push 0
lea ecx, [ebp - 0x106c]
push ecx
call fcn.006665c0
add esp, 0xc
push 0x104
push 0
lea edx, [ebp - 0x1214]
push edx
call fcn.006665c0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x1214]
push eax
call fcn.0049f360
add esp, 8
push 0x75a97c
lea ecx, [ebp - 0x1214]
push ecx
call fcn.00666bb0
add esp, 8
push 0x75a980
lea edx, [ebp - 0x1214]
push edx
call fcn.00666bb0
add esp, 8
lea ecx, [ebp - 0x48]
call fcn.00401490
mov dword [ebp - 4], 0
mov byte [ebp - 0x44], 0
push 0x33
push 0
lea eax, [ebp - 0x43]
push eax
call fcn.006665c0
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x16b4], ecx
cmp dword [ebp - 0x16b4], 0
je 0x5246ae
jmp 0x5246bf
push 0x75a9a8
lea edx, [ebp - 0x44]
push edx
call fcn.00666ba0
add esp, 8
mov eax, dword [0x7dde08]
push eax
push 0x75a9b0
call fcn.005128e0
add esp, 8
push eax
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x1214]
push edx
push str.__s__act_s_com_s
lea eax, [ebp - 0x48]
push eax
call fcn.004017f0
add esp, 0x14
lea ecx, [ebp - 0x48]
call fcn.00489570
push eax
lea ecx, [ebp - 0x106c]
push ecx
call fcn.00666ba0
add esp, 8
lea edx, [ebp - 0x106c]
push edx
lea ecx, [ebp - 0x1288]
call fcn.00404630
mov byte [ebp - 4], 1
mov dword [ebp - 0x126c], 0x44
lea eax, [ebp - 0x126c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x122c], ecx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x1230], edx
mov dword [ebp - 0x1240], 0x101
xor eax, eax
mov word [ebp - 0x123c], ax
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x126c]
push edx
push 0
push 0
push 0
push 1
push 0
push 0
lea eax, [ebp - 0x106c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x524823
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x169c], eax
push 0
push 0
lea ecx, [ebp - 0x1698]
push ecx
push 0x400
mov edx, dword [ebp - 0x169c]
push edx
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [ebp - 0x1698]
push eax
lea ecx, [ebp - 0x106c]
push ecx
push 0x75a9c8
call fcn.0066610b
add esp, 0xc
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov edx, dword [ebp - 0x1698]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x16a0], 2
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1288]
call fcn.00404770
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004014d0
mov eax, dword [ebp - 0x16a0]
jmp 0x524b3a
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x7554c6
lea ecx, [ebp - 0x1108]
call fcn.00404630
mov byte [ebp - 4], 2
mov ecx, 1
test ecx, ecx
je 0x524891
push 0
lea edx, [ebp - 0x1694]
push edx
push 0x3ff
lea eax, [ebp - 0x168c]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x52486f
jmp 0x524891
mov edx, dword [ebp - 0x1694]
mov byte [ebp + edx - 0x168c], 0
lea eax, [ebp - 0x168c]
push eax
lea ecx, [ebp - 0x1108]
call fcn.004138a0
jmp 0x524841
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [ebp - 0x128c]
push edx
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x128c]
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x1108]
call fcn.00404810
push eax
lea ecx, [ebp - 0x1690]
call fcn.0040dbe0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1690]
call fcn.00454880
cmp dword [ebp + 0xc], 0
je 0x524923
push 0
lea ecx, [ebp - 0x1690]
call fcn.004018a0
push eax
push 0x75aa18
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
cmp dword [ebp - 0x58], 0
je 0x52499b
mov ecx, dword [ebp - 0x58]
push ecx
push 0x75aa1c
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x16a4], edx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1690]
call fcn.004014d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1108]
call fcn.00404770
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1288]
call fcn.00404770
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004014d0
mov eax, dword [ebp - 0x16a4]
jmp 0x524b3a
mov dword [ebp - 0x1224], 0
mov byte [ebp - 0x10ec], 0
push 0x7f
push 0
lea eax, [ebp - 0x10eb]
push eax
call fcn.006665c0
add esp, 0xc
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x16b8], ecx
cmp dword [ebp - 0x16b8], 0
je 0x5249da
jmp 0x5249f5
push 0x75aa44
lea edx, [ebp - 0x10ec]
push edx
call fcn.00666ba0
add esp, 8
mov dword [ebp - 0x54], 0xa
push 0
lea eax, [ebp - 0x10ec]
push eax
lea ecx, [ebp - 0x1690]
call fcn.00404540
mov dword [ebp - 0x1224], eax
cmp dword [ebp - 0x1224], 0xffffffff
jne 0x524a8e
lea ecx, [ebp - 0x10ec]
push ecx
push 0x75aa4c
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov dword [ebp - 0x16a8], 3
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1690]
call fcn.004014d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1108]
call fcn.00404770
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1288]
call fcn.00404770
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004014d0
mov eax, dword [ebp - 0x16a8]
jmp 0x524b3a
mov edx, dword [ebp - 0x54]
push edx
lea eax, [ebp - 0x10ec]
push eax
call fcn.00666cf0
add esp, 4
add eax, dword [ebp - 0x1224]
push eax
lea ecx, [ebp - 0x16ac]
push ecx
lea ecx, [ebp - 0x1690]
call fcn.0040fc90
mov dword [ebp - 0x16bc], eax
mov edx, dword [ebp - 0x16bc]
mov dword [ebp - 0x16c0], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x16c0]
push eax
mov ecx, dword [ebp + 8]
call fcn.0040fe20
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x16ac]
call fcn.004014d0
mov dword [ebp - 0x16b0], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1690]
call fcn.004014d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1108]
call fcn.00404770
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1288]
call fcn.00404770
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004014d0
mov eax, dword [ebp - 0x16b0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret