Function at 0x4056d0
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 0x48443b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x4bb0
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 edi, ecx
mov dword [ebp - 0x4bb4], edi
cmp byte [edi + 0x60], 0
mov eax, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov dword [ebp - 0x4b30], eax
je 0x4058a4
mov edx, dword [edi + 0x84]
push ecx
mov ecx, dword [edi + 0x80]
call fcn.0040afa0
mov eax, dword [edi + 0x80]
mov edx, eax
mov dword [edi + 0x84], eax
mov dword [edi + 0x8c], 0
mov ecx, dword [edi + 0x80]
call fcn.0040afa0
mov eax, dword [edi + 0x80]
add esp, 4
mov dword [edi + 0x84], eax
lea eax, [ebp - 0x4b50]
mov byte [ebp - 0x4ba9], 0
mov dword [ebp - 0x4b40], 0
push 0
push eax
lea eax, [ebp - 0x4b3c]
mov dword [ebp - 0x4b44], 0
push eax
lea eax, [ebp - 0x4b38]
mov dword [ebp - 0x4b38], 0
push eax
mov dword [ebp - 0x4b3c], 0
mov dword [ebp - 0x4b50], 0xc
mov dword [ebp - 0x4b48], 1
mov dword [ebp - 0x4b4c], 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x405811
push dword [ebp - 0x4b38]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x4b3c]
call edi
mov dword [ebp - 0x4b38], 0
mov dword [ebp - 0x4b3c], 0
jmp 0x40588a
push 0
push 1
push dword [ebp - 0x4b38]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405870
push 0
lea eax, [ebp - 0x4b50]
push eax
lea eax, [ebp - 0x4b44]
push eax
lea eax, [ebp - 0x4b40]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4058c6
push dword [ebp - 0x4b40]
call edi
push dword [ebp - 0x4b44]
call edi
mov dword [ebp - 0x4b40], 0
mov dword [ebp - 0x4b44], 0
mov eax, dword [ebp - 0x4b38]
test eax, eax
je 0x40587d
push eax
call edi
mov eax, dword [ebp - 0x4b3c]
test eax, eax
je 0x40588a
push eax
call edi
mov eax, dword [ebp - 0x4b40]
test eax, eax
je 0x405897
push eax
call edi
mov eax, dword [ebp - 0x4b44]
test eax, eax
je 0x4058a4
push eax
call edi
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 8
push 0
push 1
push dword [ebp - 0x4b44]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x405870
mov edi, dword [ebp - 0x4bb4]
add edi, 4
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x4058ed
mov eax, dword [edi]
push dword [ebp - 0x4b30]
push eax
lea eax, [ebp - 0x1400]
push str.__sdism.exe___s
push eax
call fcn.0040a970
mov eax, dword [ebp - 0x4bb4]
add esp, 0x10
cmp dword [eax + 0x44], 0
je 0x405972
push str.__logpath:_
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
mov eax, dword [ebp - 0x4bb4]
add esp, 0xc
add eax, 0x34
cmp dword [eax + 0x14], 8
jb 0x40593e
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
mov eax, dword [ebp - 0x4bb4]
add esp, 0xc
mov eax, dword [eax + 0x6c]
test eax, eax
jne 0x40599b
push 0x4920d4
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
mov eax, dword [ebp - 0x4bb4]
add esp, 0xc
mov eax, dword [eax + 0x6c]
cmp eax, 1
jne 0x4059b9
push str.__loglevel:2
lea eax, [ebp - 0x1400]
push 0x800
push eax
call fcn.00474974
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x4059c1
mov edi, dword [edi]
push edi
lea eax, [ebp - 0x400]
push 0x1f4
push eax
call fcn.00474910
xor eax, eax
mov dword [ebp - 0x4b76], 0
mov word [ebp - 0x4b72], ax
add esp, 0xc
mov eax, dword [ebp - 0x4b3c]
xorps xmm0, xmm0
mov dword [ebp - 0x4b68], eax
mov dword [ebp - 0x4b6c], eax
mov eax, dword [ebp - 0x4b40]
mov dword [ebp - 0x4b70], eax
xor eax, eax
mov word [ebp - 0x4b78], ax
lea eax, [ebp - 0x4b60]
push eax
lea eax, [ebp - 0x4ba8]
movlpd qword [ebp - 0x4ba4], xmm0
push eax
lea eax, [ebp - 0x400]
movlpd qword [ebp - 0x4b9c], xmm0
push eax
mov eax, dword [ebp - 0x4bb4]
push 0
movups xmmword [ebp - 0x4b60], xmm0
mov dword [ebp - 0x4ba8], 0x44
push dword [eax + 0x68]
lea eax, [ebp - 0x1400]
movlpd qword [ebp - 0x4b94], xmm0
push 1
push 0
push 0
push eax
push 0
movlpd qword [ebp - 0x4b8c], xmm0
movlpd qword [ebp - 0x4b84], xmm0
mov dword [ebp - 0x4b7c], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4061be
xor eax, eax
mov dword [ebp - 0x4b1c], 0
mov dword [ebp - 0x4b18], 7
mov word [ebp - 0x4b2c], ax
mov dword [ebp - 4], eax
xor edi, edi
push edi
mov word [ebp - 0x3b10], ax
mov dword [ebp - 0x4b30], eax
mov dword [ebp - 0x4bb8], eax
mov dword [ebp - 0x4b14], eax
lea eax, [ebp - 0x4b14]
push eax
push edi
push 0x1000
push edi
push dword [ebp - 0x4b38]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
nop
xor ecx, ecx
mov dword [ebp - 0x4b34], ecx
cmp dword [ebp - 0x4b14], ecx
jbe 0x405b26
push ecx
lea eax, [ebp - 0x4b34]
push eax
push 0x1000
lea eax, [ebp - 0x4b10]
push eax
push dword [ebp - 0x4b38]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x4b34]
xor edx, edx
mov dword [ebp - 0x4bbc], edx
test ecx, ecx
jle 0x406105
nop word [eax + eax]
lea eax, [ebp - 0x4b10]
add eax, edx
mov dword [ebp - 0x4bc0], eax
mov al, byte [eax]
cmp al, 0xa
jne 0x4060e3
add edi, edi
cmp edi, 0x2710
jae 0x40620d
xor eax, eax
mov word [ebp + edi - 0x3b10], ax
lea eax, [ebp - 0x3b10]
push 0x1388
push eax
call fcn.00475084
lea ecx, [ebp - 0x3b10]
add esp, 8
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405b90
sub ecx, edx
lea eax, [ebp - 0x3b10]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x4b2c]
call fcn.00402430
inc dword [ebp - 0x4bb8]
lea eax, [ebp - 0x3b10]
push 0x18
push str.PROGRAM_FILESTERABYTE
push eax
call fcn.00474ea1
add esp, 0xc
test eax, eax
jne 0x405c7f
cmp byte [esi], al
jne 0x405bf3
push ecx
push str.IMAGEW.EXE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405bf3
mov byte [esi], 1
cmp byte [esi + 0x30], 0
jne 0x405c13
push ecx
push str.TBIVIEW.EXE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405c13
mov byte [esi + 0x30], 1
cmp byte [esi + 0x60], 0
jne 0x405c33
push ecx
push str.TBIMOUNT.EXE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405c33
mov byte [esi + 0x60], 1
cmp byte [esi + 0x90], 0
jne 0x405c59
push ecx
push str.TBIHD.EXE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405c59
mov byte [esi + 0x90], 1
cmp byte [esi + 0xc0], 0
jne 0x405c7f
push ecx
push str.TBOSDTW.EXE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405c7f
mov byte [esi + 0xc0], 1
push 0x12
lea eax, [ebp - 0x3b10]
push str.WINDOWSSYSTEM32_
push eax
call fcn.00474ea1
add esp, 0xc
test eax, eax
jne 0x405d86
cmp byte [esi + 0xf0], al
jne 0x405ce6
mov ecx, str.WINDOWSSYSTEM32TBLAUNCHER.EXE
lea eax, [ebp - 0x3b10]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405cd6
test dx, dx
je 0x405cd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405cd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x405cb0
xor eax, eax
jmp 0x405cdb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405ce6
mov byte [esi + 0xf0], 1
cmp byte [esi + 0x150], 0
jne 0x405d36
mov ecx, str.WINDOWSSYSTEM32TBWINRE.TXT
lea eax, [ebp - 0x3b10]
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405d26
test dx, dx
je 0x405d22
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405d26
add eax, 4
add ecx, 4
test dx, dx
jne 0x405d00
xor eax, eax
jmp 0x405d2b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405d36
mov byte [esi + 0x150], 1
cmp byte [esi + 0x120], 0
jne 0x405d86
mov ecx, str.WINDOWSSYSTEM32TBWINPE.TXT
lea eax, [ebp - 0x3b10]
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405d76
test dx, dx
je 0x405d72
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405d76
add eax, 4
add ecx, 4
test dx, dx
jne 0x405d50
xor eax, eax
jmp 0x405d7b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405d86
mov byte [esi + 0x120], 1
cmp byte [esi + 0x1b0], 0
jne 0x405dd6
mov ecx, str.SOURCESRECOVERYRECENV.EXE
lea eax, [ebp - 0x3b10]
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405dc6
test dx, dx
je 0x405dc2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405dc6
add eax, 4
add ecx, 4
test dx, dx
jne 0x405da0
xor eax, eax
jmp 0x405dcb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x405dd6
mov byte [esi + 0x1b0], 1
push 0x24
lea eax, [ebp - 0x3b10]
push str.WINDOWSSYSTEM32TERABYTEBUILDVERS_
push eax
call fcn.00474ea1
add esp, 0xc
test eax, eax
jne 0x4060c4
cmp byte [esi + 0x1b2], al
jne 0x405e19
push ecx
push str.IFW_BOOTWIM
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405e19
mov byte [esi + 0x1b2], 1
cmp dword [esi + 4], 0
jne 0x405e4c
push ecx
push str.IMAGEW_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405e4c
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
push esi
call fcn.00409ce0
cmp dword [esi + 0x34], 0
jne 0x405e82
push ecx
push str.TBIVIEW_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405e82
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x30]
push eax
call fcn.00409ce0
cmp dword [esi + 0x64], 0
jne 0x405eb8
push ecx
push str.TBIMOUNT_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405eb8
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x60]
push eax
call fcn.00409ce0
cmp dword [esi + 0x94], 0
jne 0x405ef4
push ecx
push str.TBIHD_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405ef4
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x90]
push eax
call fcn.00409ce0
cmp dword [esi + 0xf4], 0
jne 0x405f30
push ecx
push str.TBLAUNCHER_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405f30
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0xf0]
push eax
call fcn.00409ce0
cmp dword [esi + 0xc4], 0
jne 0x405fd0
push ecx
push str.TBOSDT_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405fd0
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0xc0]
push eax
call fcn.00409ce0
push ecx
push str._TRIAL
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405f90
mov dword [esi + 0xec], 0
push ecx
push str._PRO
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405fb0
mov dword [esi + 0xec], 1
push ecx
push str._PROBOOTIT
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x405fd0
mov dword [esi + 0xec], 2
cmp dword [esi + 0x154], 0
jne 0x40602c
push ecx
push str.WINRE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x40602c
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x150]
push eax
call fcn.00409ce0
push ecx
push str.X64_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x40602c
mov dword [esi + 0x17c], 1
cmp dword [esi + 0x124], 0
jne 0x406088
push ecx
push str.WINPE
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x406088
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x120]
push eax
call fcn.00409ce0
push ecx
push str.X64_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x406088
mov dword [esi + 0x14c], 1
cmp dword [esi + 0x184], 0
jne 0x4060c4
push ecx
push str.BUILDER_
lea ecx, [ebp - 0x4b2c]
call fcn.0040a4e0
cmp eax, 0xffffffff
je 0x4060c4
sub esp, 0x18
lea eax, [ebp - 0x4b2c]
mov ecx, esp
push eax
call fcn.004022e0
lea eax, [esi + 0x180]
push eax
call fcn.00409ce0
mov ecx, dword [ebp - 0x4b34]
xor eax, eax
mov edx, dword [ebp - 0x4bbc]
xor edi, edi
mov word [ebp - 0x3b10], ax
mov eax, dword [ebp - 0x4bc0]
mov al, byte [eax]
cmp al, 0xd
je 0x4060f6
cmp al, 0xa
je 0x4060f6
cbw
mov word [ebp + edi*2 - 0x3b10], ax
inc edi
inc edx
mov dword [ebp - 0x4bbc], edx
cmp edx, ecx
jl 0x405b40
lea eax, [ebp - 0x4b30]
push eax
push dword [ebp - 0x4b60]
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 - 0x4b38]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov eax, dword [ebp - 0x4b30]
cmp eax, 0x103
je 0x405af0
cmp dword [ebp - 0x4b14], 0
ja 0x405af0
mov ecx, dword [ebp - 0x4bb4]
push dword [ebp - 0x4b60]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ecx + 0x8c], eax
call edi
push dword [ebp - 0x4b5c]
call edi
mov edx, dword [ebp - 0x4b18]
cmp edx, 8
jb 0x4061c5
mov ecx, dword [ebp - 0x4b2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4061b2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406208
push edx
push ecx
call fcn.0046ba31
add esp, 8
jmp 0x4061c5
mov byte [ebp - 0x4ba9], 1
mov eax, dword [ebp - 0x4b38]
test eax, eax
je 0x4061d2
push eax
call edi
mov eax, dword [ebp - 0x4b3c]
test eax, eax
je 0x4061df
push eax
call edi
mov eax, dword [ebp - 0x4b40]
test eax, eax
je 0x4061ec
push eax
call edi
mov eax, dword [ebp - 0x4b44]
test eax, eax
je 0x4061f9
push eax
call edi
cmp byte [ebp - 0x4ba9], 0
sete al
jmp 0x4058a6
call fcn.00471513
call fcn.0046bb60
int3