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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4843fb
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x4ba0
call fcn.004839d0
mov eax, dword [0x4ab00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x4b98], esi
cmp byte [esi + 0x60], 0
mov eax, dword [ebx + 8]
mov dword [ebp - 0x4b18], eax
je 0x405243
mov edx, dword [esi + 0x84]
push ecx
mov ecx, dword [esi + 0x80]
call fcn.0040afa0
mov eax, dword [esi + 0x80]
mov edx, eax
mov dword [esi + 0x84], eax
mov dword [esi + 0x8c], 0
mov ecx, dword [esi + 0x80]
call fcn.0040afa0
mov eax, dword [esi + 0x80]
add esp, 4
mov dword [esi + 0x84], eax
lea eax, [ebp - 0x4b38]
mov byte [ebp - 0x4b91], 0
mov dword [ebp - 0x4b28], 0
push 0
push eax
lea eax, [ebp - 0x4b24]
mov dword [ebp - 0x4b2c], 0
push eax
lea eax, [ebp - 0x4b20]
mov dword [ebp - 0x4b20], 0
push eax
mov dword [ebp - 0x4b24], 0
mov dword [ebp - 0x4b38], 0xc
mov dword [ebp - 0x4b30], 1
mov dword [ebp - 0x4b34], 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4051ae
push dword [ebp - 0x4b20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x4b24]
call esi
mov dword [ebp - 0x4b20], 0
mov dword [ebp - 0x4b24], 0
jmp 0x405229
mov edi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0
push 1
push dword [ebp - 0x4b20]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40520f
push 0
lea eax, [ebp - 0x4b38]
push eax
lea eax, [ebp - 0x4b2c]
push eax
lea eax, [ebp - 0x4b28]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x405265
push dword [ebp - 0x4b28]
call esi
push dword [ebp - 0x4b2c]
call esi
mov dword [ebp - 0x4b28], 0
mov dword [ebp - 0x4b2c], 0
mov eax, dword [ebp - 0x4b20]
test eax, eax
je 0x40521c
push eax
call esi
mov eax, dword [ebp - 0x4b24]
test eax, eax
je 0x405229
push eax
call esi
mov eax, dword [ebp - 0x4b28]
test eax, eax
je 0x405236
push eax
call esi
mov eax, dword [ebp - 0x4b2c]
test eax, eax
je 0x405243
push eax
call esi
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0046b9f0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
push 0
push 1
push dword [ebp - 0x4b2c]
call edi
test eax, eax
je 0x40520f
mov edi, dword [ebp - 0x4b98]
cmp dword [edi + 0x18], 8
lea esi, [edi + 4]
mov eax, esi
jb 0x405288
mov eax, dword [esi]
push dword [ebp - 0x4b18]
push eax
lea eax, [ebp - 0x1400]
push str.__sdism.exe___s
push eax
call fcn.0040a970
add esp, 0x10
cmp dword [edi + 0x44], 0
je 0x4052fb
push str.__logpath:_
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
lea eax, [edi + 0x34]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x4052cd
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
add esp, 0xc
lea eax, [ebp - 0x1400]
push 0x4920d0
push 0x800
push eax
call fcn.00474974
add esp, 0xc
mov eax, dword [edi + 0x6c]
test eax, eax
jne 0x40531e
push 0x4920d4
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
mov eax, dword [edi + 0x6c]
add esp, 0xc
cmp eax, 1
jne 0x40533c
push str.__loglevel:2
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x405344
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x400]
push 0x1f4
push eax
call fcn.00474910
xor eax, eax
mov dword [ebp - 0x4b5e], 0
mov word [ebp - 0x4b5a], ax
add esp, 0xc
mov eax, dword [ebp - 0x4b24]
xorps xmm0, xmm0
mov dword [ebp - 0x4b50], eax
mov dword [ebp - 0x4b54], eax
mov eax, dword [ebp - 0x4b28]
mov dword [ebp - 0x4b58], eax
xor eax, eax
mov word [ebp - 0x4b60], ax
lea eax, [ebp - 0x4b48]
push eax
lea eax, [ebp - 0x4b90]
movlpd qword [ebp - 0x4b8c], xmm0
push eax
lea eax, [ebp - 0x400]
movlpd qword [ebp - 0x4b84], xmm0
push eax
push 0
push dword [edi + 0x68]
lea eax, [ebp - 0x1400]
movlpd qword [ebp - 0x4b7c], xmm0
push 1
push 0
push 0
push eax
push 0
movups xmmword [ebp - 0x4b48], xmm0
mov dword [ebp - 0x4b90], 0x44
movlpd qword [ebp - 0x4b74], xmm0
movlpd qword [ebp - 0x4b6c], xmm0
mov dword [ebp - 0x4b64], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405666
xor eax, eax
xor esi, esi
push esi
mov word [ebp - 0x4b10], ax
mov dword [ebp - 0x4b18], eax
mov dword [ebp - 0x4b14], eax
lea eax, [ebp - 0x4b14]
push eax
push esi
push 0x1000
push esi
push dword [ebp - 0x4b20]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
nop dword [eax + eax]
xor ecx, ecx
mov dword [ebp - 0x4b1c], ecx
cmp dword [ebp - 0x4b14], ecx
jbe 0x405486
push ecx
lea eax, [ebp - 0x4b1c]
push eax
push 0x1000
lea eax, [ebp - 0x2400]
push eax
push dword [ebp - 0x4b20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x4b1c]
xor edi, edi
test ecx, ecx
jle 0x4055c4
mov al, byte [ebp + edi - 0x2400]
cmp al, 0xa
jne 0x4055a8
add esi, esi
cmp esi, 0x2710
jae 0x4056b5
xor eax, eax
mov dword [ebp - 0x4b9c], 7
mov word [ebp + esi - 0x4b10], ax
mov dword [ebp - 0x4ba0], eax
mov word [ebp - 0x4bb0], ax
lea eax, [ebp - 0x4b10]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4054d7
sub eax, edx
lea ecx, [ebp - 0x4bb0]
sar eax, 1
push eax
lea eax, [ebp - 0x4b10]
push eax
call fcn.00402430
mov ecx, dword [ebp - 0x4b98]
sub ecx, 0xffffff80
mov dword [ebp - 4], 0
mov eax, dword [ecx + 4]
cmp dword [ecx + 8], eax
je 0x40553c
movups xmm0, xmmword [ebp - 0x4bb0]
mov edx, 7
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x4ba0]
movq qword [eax + 0x10], xmm0
xor eax, eax
add dword [ecx + 4], 0x18
mov word [ebp - 0x4bb0], ax
jmp 0x40554f
lea edx, [ebp - 0x4bb0]
push edx
push eax
call fcn.0040aa00
mov edx, dword [ebp - 0x4b9c]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x405590
mov ecx, dword [ebp - 0x4bb0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405586
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b0
push edx
push ecx
call fcn.0046ba31
add esp, 8
mov ecx, dword [ebp - 0x4b1c]
xor eax, eax
mov word [ebp - 0x4b10], ax
xor esi, esi
mov al, byte [ebp + edi - 0x2400]
cmp al, 0xd
je 0x4055bb
cmp al, 0xa
je 0x4055bb
cbw
mov word [ebp + esi*2 - 0x4b10], ax
inc esi
inc edi
cmp edi, ecx
jl 0x405490
lea eax, [ebp - 0x4b18]
push eax
push dword [ebp - 0x4b48]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push 0
lea eax, [ebp - 0x4b14]
mov dword [ebp - 0x4b14], 0
push eax
push 0
push 0x1000
push 0
push dword [ebp - 0x4b20]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov eax, dword [ebp - 0x4b18]
cmp eax, 0x103
jne 0x405635
cmp dword [ebp - 0x4b14], 0
jne 0x405450
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x4b18]
cmp eax, 0x103
je 0x405450
cmp dword [ebp - 0x4b14], 0
ja 0x405450
mov ecx, dword [ebp - 0x4b98]
push dword [ebp - 0x4b48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ecx + 0x8c], eax
call esi
push dword [ebp - 0x4b44]
call esi
jmp 0x40566d
mov byte [ebp - 0x4b91], 1
mov eax, dword [ebp - 0x4b20]
test eax, eax
je 0x40567a
push eax
call esi
mov eax, dword [ebp - 0x4b24]
test eax, eax
je 0x405687
push eax
call esi
mov eax, dword [ebp - 0x4b28]
test eax, eax
je 0x405694
push eax
call esi
mov eax, dword [ebp - 0x4b2c]
test eax, eax
je 0x4056a1
push eax
call esi
cmp byte [ebp - 0x4b91], 0
sete al
jmp 0x405245
call fcn.00471513
call fcn.0046bb60
int3