Function at 0x440bf0
Capabilities:
Read file on windows
Read pipe
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10014
call fcn.005c8a70
mov eax, dword [0x71ccd4]
xor eax, esp
mov dword [esp + 0x10010], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0xc], eax
mov eax, dword [edi + 4]
cmp eax, 3
je case.0x440ce3.4
cmp eax, 1
jne 0x440f21
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push 8
push eax
call fcn.0043e210
test al, al
je 0x440ea9
mov esi, dword [esp + 0x14]
mov ecx, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test esi, esi
je 0x440cd6
mov ebx, dword [edi]
test ebx, ebx
je 0x440d9a
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x440d9a
push 0
lea edx, [esp + 0x10018]
mov dword [esp + 0x10018], 0
push edx
push 0
push 0
push 0
push eax
call ecx
test eax, eax
je 0x440d87
cmp dword [esp + 0x10014], esi
jb 0x440d9a
push 0
lea eax, [esp + 0x1001c]
mov dword [esp + 0x1001c], 0
push eax
push esi
lea eax, [esp + 0x24]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x440d7e
mov eax, dword [esp + 0x14]
mov byte [esp + eax + 0x18], 0
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cmp eax, 4
ja case.0x440ce3.0
jmp dword [eax*4 + 0x440f3c]
mov dword [esp + 0x10], 4
add esi, 8
je case.0x440ce3.4
mov eax, dword [edi]
test eax, eax
je 0x440d3d
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x440d3d
push 0
lea ecx, [esp + 0x10018]
mov dword [esp + 0x10018], 0
push ecx
push esi
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x440d3d
cmp dword [esp + 0x10014], esi
je case.0x440ce3.4
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x440d5d
mov eax, dword [edi + 4]
cmp eax, 3
je 0x440d51
cmp eax, 1
jne 0x440d5d
lea eax, [edi + 0x54]
push eax
push dword [edi + 0x50]
call ecx
add esp, 8
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
jmp case.0x440ce3.4
mov ecx, ebx
call fcn.0043e170
jmp 0x440d9a
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 4], 0xffffffff
mov byte [ebx], 0
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 2
mov ecx, str.Partial_data_in_frame
mov esi, 1
mov edx, ebx
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x440ee5
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x440db2
jmp 0x440ee5
mov ebx, dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
call fcn.00440f50
push ecx
mov ecx, ebx
call fcn.0043c370
add esp, 4
mov dword [edi + 0x50], eax
mov edx, str.message
mov ecx, ebx
push 0x6dced8
call fcn.0043c3e0
mov esi, eax
add esp, 4
test esi, esi
je 0x440e2e
mov dl, byte [esi]
lea ecx, [edi + 0x54]
test dl, dl
je 0x440e2b
mov eax, 1
sub esi, ecx
cmp eax, 0x100
jae 0x440e2b
mov byte [ecx], dl
inc eax
mov dl, byte [esi + ecx + 1]
inc ecx
test dl, dl
jne 0x440e18
mov byte [ecx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x440f05
mov eax, dword [edi + 4]
cmp eax, 3
je 0x440e4a
cmp eax, 1
jne 0x440f05
lea eax, [edi + 0x54]
push eax
jmp 0x440efd
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
call fcn.00440f50
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10010]
xor ecx, esp
call fcn.005c81cf
mov esp, ebp
pop ebp
ret 4
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 2
mov ecx, str.Bad_ipc_frame
mov esi, 1
mov edx, ebx
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x440ee5
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x440e92
jmp 0x440ee5
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x440f21
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 1
mov ecx, str.Pipe_closed
mov esi, 1
mov edx, ebx
sub esi, ecx
nop dword [eax + eax]
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x440ee5
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x440ed0
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x440f05
mov eax, dword [edi + 4]
cmp eax, 3
je 0x440efc
cmp eax, 1
jne 0x440f05
push ebx
push dword [edi + 0x50]
call ecx
add esp, 8
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
mov ecx, dword [esp + 0x1001c]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005c81cf
mov esp, ebp
pop ebp
ret 4