Function at 0x404d80
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4619eb
mov eax, dword fs:[0]
push eax
mov eax, 0x4ba8
call fcn.0045db90
mov eax, dword [0x4920c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4b98], edi
cmp byte [edi + 0x60], 0
mov ebx, dword [ebp + 8]
je 0x404f41
mov edx, dword [edi + 0x84]
lea esi, [edi + 0x80]
mov dword [ebp - 0x4b94], esi
push dword [ebp - 0x4b94]
push ecx
mov ecx, dword [esi]
call fcn.004099d0
mov eax, dword [esi]
add esp, 8
mov dword [esi + 4], eax
push dword [ebp - 0x4b94]
mov dword [edi + 0x8c], 0
mov edx, dword [esi + 4]
push ecx
mov ecx, dword [esi]
call fcn.004099d0
mov eax, dword [esi]
add esp, 8
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 0x4b34]
push eax
lea eax, [ebp - 0x4b20]
push eax
lea eax, [ebp - 0x4b1c]
push eax
mov byte [ebp - 0x4b8d], 0
mov dword [ebp - 0x4b24], 0
mov dword [ebp - 0x4b28], 0
mov dword [ebp - 0x4b1c], 0
mov dword [ebp - 0x4b20], 0
mov dword [ebp - 0x4b34], 0xc
mov dword [ebp - 0x4b2c], 1
mov dword [ebp - 0x4b30], 0
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
jne 0x404eac
push dword [ebp - 0x4b1c]
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push dword [ebp - 0x4b20]
call esi
mov dword [ebp - 0x4b1c], 0
mov dword [ebp - 0x4b20], 0
jmp 0x404f27
mov edi, dword [sym.imp.KERNEL32.DLL_SetHandleInformation]
push 0
push 1
push dword [ebp - 0x4b1c]
call edi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
test eax, eax
je 0x404f0d
push 0
lea eax, [ebp - 0x4b34]
push eax
lea eax, [ebp - 0x4b28]
push eax
lea eax, [ebp - 0x4b24]
push eax
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
jne 0x404f61
push dword [ebp - 0x4b24]
call esi
push dword [ebp - 0x4b28]
call esi
mov dword [ebp - 0x4b24], 0
mov dword [ebp - 0x4b28], 0
mov eax, dword [ebp - 0x4b1c]
test eax, eax
je 0x404f1a
push eax
call esi
mov eax, dword [ebp - 0x4b20]
test eax, eax
je 0x404f27
push eax
call esi
mov eax, dword [ebp - 0x4b24]
test eax, eax
je 0x404f34
push eax
call esi
mov eax, dword [ebp - 0x4b28]
test eax, eax
je 0x404f41
push eax
call esi
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044fdac
mov esp, ebp
pop ebp
ret 4
push 0
push 1
push dword [ebp - 0x4b28]
call edi
test eax, eax
je 0x404f0d
mov edi, dword [ebp - 0x4b98]
cmp dword [edi + 0x18], 8
lea esi, [edi + 4]
jb 0x404f84
mov eax, dword [esi]
jmp 0x404f86
mov eax, esi
push ebx
push eax
lea eax, [ebp - 0x13fc]
push str.__sdism.exe___s
push eax
call fcn.00409950
add esp, 0x10
cmp dword [edi + 0x44], 0
je 0x404ff1
push str.__logpath:_
lea eax, [ebp - 0x13fc]
push 0x800
push eax
call fcn.00451274
lea eax, [edi + 0x34]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x404fc6
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x13fc]
push 0x800
push eax
call fcn.00451274
push 0x46ba84
lea eax, [ebp - 0x13fc]
push 0x800
push eax
call fcn.00451274
add esp, 0x18
cmp dword [edi + 0x6c], 0
jne 0x405010
push 0x46ba88
lea eax, [ebp - 0x13fc]
push 0x800
push eax
call fcn.00451274
add esp, 0xc
cmp dword [edi + 0x6c], 1
jne 0x40502f
push str.__loglevel:2
lea eax, [ebp - 0x13fc]
push 0x800
push eax
call fcn.00451274
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x405037
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x3fc]
push 0x1f4
push eax
call fcn.004513ee
push 0x44
xorps xmm0, xmm0
lea eax, [ebp - 0x4b8c]
push 0
push eax
movq qword [ebp - 0x4b44], xmm0
movq qword [ebp - 0x4b3c], xmm0
call fcn.00455910
mov eax, dword [ebp - 0x4b20]
mov dword [ebp - 0x4b4c], eax
mov dword [ebp - 0x4b50], eax
mov eax, dword [ebp - 0x4b24]
add esp, 0x18
mov dword [ebp - 0x4b54], eax
xor eax, eax
mov word [ebp - 0x4b5c], ax
lea eax, [ebp - 0x4b44]
push eax
lea eax, [ebp - 0x4b8c]
push eax
lea eax, [ebp - 0x3fc]
push eax
push 0
push dword [edi + 0x68]
lea eax, [ebp - 0x13fc]
push 1
push 0
push 0
push eax
push 0
mov dword [ebp - 0x4b8c], 0x44
mov dword [ebp - 0x4b60], 0x101
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
test eax, eax
je 0x4052f0
xor eax, eax
xor esi, esi
push esi
mov word [ebp - 0x4b0c], ax
mov dword [ebp - 0x4b14], eax
mov dword [ebp - 0x4b18], eax
mov dword [ebp - 0x4b10], eax
lea eax, [ebp - 0x4b10]
push eax
push esi
push 0x1000
push esi
push dword [ebp - 0x4b1c]
call dword [sym.imp.KERNEL32.DLL_PeekNamedPipe]
mov ebx, dword [ebp - 0x4b94]
jmp 0x405130
xor ecx, ecx
mov dword [ebp - 0x4b14], ecx
cmp dword [ebp - 0x4b10], ecx
jbe 0x405166
push ecx
lea eax, [ebp - 0x4b14]
push eax
push 0x1000
lea eax, [ebp - 0x23fc]
push eax
push dword [ebp - 0x4b1c]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp - 0x4b14]
xor edi, edi
test ecx, ecx
jle 0x405249
cmp byte [ebp + edi - 0x23fc], 0xa
jne 0x405226
add esi, esi
cmp esi, 0x2710
jae 0x4052eb
xor eax, eax
mov word [ebp + esi - 0x4b0c], ax
mov dword [ebp - 0x4b9c], 7
mov dword [ebp - 0x4ba0], eax
mov word [ebp - 0x4bb0], ax
cmp word [ebp - 0x4b0c], ax
je 0x4051cf
lea eax, [ebp - 0x4b0c]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4051c0
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x4b0c]
push eax
lea ecx, [ebp - 0x4bb0]
call fcn.004023a0
lea eax, [ebp - 0x4bb0]
push eax
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.00408fe0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x4b9c], 8
jb 0x405215
push dword [ebp - 0x4bb0]
call fcn.00450920
add esp, 4
mov ecx, dword [ebp - 0x4b14]
xor eax, eax
mov word [ebp - 0x4b0c], ax
xor esi, esi
mov al, byte [ebp + edi - 0x23fc]
cmp al, 0xd
je 0x405240
cmp al, 0xa
je 0x405240
cbw
mov word [ebp + esi*2 - 0x4b0c], ax
inc esi
inc edi
cmp edi, ecx
jl 0x405170
lea eax, [ebp - 0x4b18]
push eax
push dword [ebp - 0x4b44]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
push 0
lea eax, [ebp - 0x4b10]
push eax
push 0
push 0x1000
push 0
push dword [ebp - 0x4b1c]
mov dword [ebp - 0x4b10], 0
call dword [sym.imp.KERNEL32.DLL_PeekNamedPipe]
mov eax, dword [ebp - 0x4b18]
cmp eax, 0x103
jne 0x4052ba
cmp dword [ebp - 0x4b10], 0
jne 0x405130
push 0xfa
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [ebp - 0x4b18]
cmp eax, 0x103
je 0x405130
cmp dword [ebp - 0x4b10], 0
ja 0x405130
mov edi, dword [ebp - 0x4b98]
push dword [ebp - 0x4b44]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [edi + 0x8c], eax
call ebx
push dword [ebp - 0x4b40]
call ebx
jmp 0x4052f7
call fcn.0045119a
mov byte [ebp - 0x4b8d], 1
mov eax, dword [ebp - 0x4b1c]
test eax, eax
je 0x405304
push eax
call ebx
mov eax, dword [ebp - 0x4b20]
test eax, eax
je 0x405311
push eax
call ebx
mov eax, dword [ebp - 0x4b24]
test eax, eax
je 0x40531e
push eax
call ebx
mov eax, dword [ebp - 0x4b28]
test eax, eax
je 0x40532b
push eax
call ebx
cmp byte [ebp - 0x4b8d], 0
sete al
jmp 0x404f43