Function at 0x404d70
Capabilities:
Create pipe
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431c31
mov eax, dword fs:[0]
push eax
mov eax, 0x1334
call fcn.00417e60
mov eax, dword [0x4460f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, str.explorer.exe
mov eax, dword [esi]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404dd6
test dx, dx
je 0x404dd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404dd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x404db0
xor eax, eax
jmp 0x404ddb
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x404e3f
push dword [esi + 4]
call fcn.0041de7a
add esp, 4
push eax
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x404e17
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x404e1e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x404f9a
push 0x4e20
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
test eax, eax
jne 0x404e11
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x404f9a
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
dec eax
cmp eax, 0x102
ja 0x404e76
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.00419feb
add esp, 8
test eax, eax
je 0x404e76
xor ecx, ecx
mov word [eax + 2], cx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x132c]
call fcn.00402850
push 0xa
push 0x43350c
lea ecx, [ebp - 0x132c]
mov dword [ebp - 4], 0
call fcn.00404190
call fcn.00405360
mov ecx, eax
test ecx, ecx
jne 0x404eb6
push 0x80004005
call fcn.00404370
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1330], eax
push dword [esi + 4]
lea eax, [ebp - 0x1330]
mov byte [ebp - 4], 1
push dword [esi + 8]
push dword [ebp - 0x132c]
push str.__s___c__s__p__s__y
push eax
call fcn.00405260
add esp, 0x14
mov dword [ebp - 0x1340], 0xc
lea eax, [ebp - 0x1340]
mov dword [ebp - 0x133c], 0
mov dword [ebp - 0x1338], 1
push 0
push eax
lea eax, [ebp - 0x1320]
push eax
lea eax, [ebp - 0x1324]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov esi, dword [ebp - 0x1330]
test eax, eax
je 0x404f56
push dword [ebp - 0x1320]
push esi
call fcn.004043b0
add esp, 8
test eax, eax
jne 0x404fb6
push dword [ebp - 0x1320]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x1324]
call edi
xor edi, edi
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404f76
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x132c]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x404f98
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00417e4f
mov esp, ebp
pop ebp
ret
push 0x1000
lea eax, [ebp - 0x1218]
push 0
push eax
call fcn.0041ad60
lea ecx, [ebp - 0x1218]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404fd5
sub ecx, edx
lea eax, [ebp - 0x1218]
push ecx
push 0
push eax
call fcn.0041ad60
add esp, 0xc
lea eax, [ebp - 0x1334]
push 0
push eax
push 0xfff
lea eax, [ebp - 0x1218]
push eax
push dword [ebp - 0x1324]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1320]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
call edi
push dword [ebp - 0x1324]
call edi
test ebx, ebx
je 0x404f56
cmp dword [ebp - 0x1334], 0
je 0x404f56
lea eax, [ebp - 0x1318]
mov dword [ebp - 0x131c], eax
lea ecx, [ebp - 0x131c]
push 3
lea eax, [ebp - 0x1218]
push eax
call fcn.00405450
push dword [ebp - 0x131c]
lea ecx, [ebp - 0x1328]
mov byte [ebp - 4], 2
call fcn.00402850
mov eax, dword [ebp - 0x131c]
lea ecx, [ebp - 0x1318]
cmp eax, ecx
je 0x40508c
push eax
call fcn.0041d363
add esp, 4
mov eax, dword [ebp - 0x1328]
cmp dword [eax - 0xc], 0
jge 0x4050ae
or edi, 0xffffffff
lea ecx, [ebp - 0x1328]
shr edi, 0x1f
call fcn.004031f0
jmp 0x404f58
push str.Error_closing_handle
push eax
call fcn.0041a08c
mov edi, eax
add esp, 8
test edi, edi
jne 0x4050d8
or edi, 0xffffffff
lea ecx, [ebp - 0x1328]
shr edi, 0x1f
call fcn.004031f0
jmp 0x404f58
sub edi, dword [ebp - 0x1328]
lea ecx, [ebp - 0x1328]
sar edi, 1
shr edi, 0x1f
call fcn.004031f0
jmp 0x404f58