Function at 0x401450
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x178]
sub esp, 0x178
push 0xffffffffffffffff
push 0x4f86c8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5370e4]
xor eax, ebp
mov dword [ebp + 0x174], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401490
sub eax, esi
cmp eax, 0x104
jbe 0x4014aa
mov eax, 1
jmp 0x401949
push 0x104
lea eax, [ebp + 0x70]
push eax
push str._c__s
push edx
call fcn.00428ed7
add esp, 0x10
cmp eax, 1
jne 0x4014a0
call fcn.0041ef5b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4014e0
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0
call fcn.0041ef5b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x401510
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], 1
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ecx
call ebx
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x40153e
xor eax, eax
jmp 0x401555
lea eax, [esi + esi]
call fcn.0043be00
mov eax, esp
push 3
push esi
lea edx, [ebp + 0x70]
push edx
push eax
call fcn.00401000
push eax
push str..pipecrossex__s
lea edi, [ebp - 0x18]
call fcn.00402520
add esp, 8
lea eax, [ebp + 0x70]
push eax
call ebx
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x40157b
xor eax, eax
jmp 0x401592
lea eax, [esi + esi]
call fcn.0043be00
mov eax, esp
push 3
push esi
lea ecx, [ebp + 0x70]
push ecx
push eax
call fcn.00401000
push eax
push str..pipecrossex__s_callback
lea edi, [ebp - 0x14]
call fcn.00402520
mov edi, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
add esp, 8
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push edi
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
mov dword [0x544eb0], eax
cmp eax, 0xffffffff
jne 0x40160d
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x401904
push 0x1388
push edi
call ebx
test eax, eax
je 0x401904
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push edi
call esi
mov dword [0x544eb0], eax
cmp eax, 0xffffffff
je 0x4015d0
mov edi, dword [ebp - 0x14]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push edi
call esi
mov dword [0x544eb4], eax
cmp eax, 0xffffffff
jne 0x40166d
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x4016f1
push 0x1388
push edi
call ebx
test eax, eax
je 0x4016f1
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push edi
call esi
mov dword [0x544eb4], eax
cmp eax, 0xffffffff
je 0x401630
mov eax, dword [0x544eb0]
mov esi, dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
xor ebx, ebx
push ebx
push ebx
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x20], 2
call esi
test eax, eax
je 0x4016f1
mov edx, dword [0x544eb4]
push ebx
push ebx
lea ecx, [ebp - 0x20]
push ecx
push edx
call esi
test eax, eax
je 0x4016f1
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp]
call fcn.00401c20
mov eax, 0xf
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x4c], ebx
mov byte [ebp + 0x3c], bl
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x30], ebx
mov byte [ebp + 0x20], bl
push 1
lea edi, [ebp]
mov byte [ebp - 4], 4
call fcn.00401f50
mov edi, eax
cmp edi, 0xffffffff
jne 0x401706
lea ecx, [ebp + 0x1c]
call fcn.00401c60
lea ecx, [ebp + 0x38]
call fcn.00401c60
lea ecx, [ebp]
call fcn.00401c60
lea ecx, [ebp - 0x14]
call fcn.00405e10
lea ecx, [ebp - 0x18]
call fcn.00405e10
jmp 0x401946
push edi
xor ecx, ecx
lea esi, [ebp + 0x54]
lea edx, [ebp]
call fcn.00401cd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 5
call fcn.00401e70
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00401c60
push 0xffffffffffffffff
lea ecx, [edi + 1]
lea esi, [ebp - 0x40]
lea edx, [ebp]
call fcn.00401cd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 6
call fcn.00401e70
mov byte [ebp - 4], 4
mov ecx, esi
call fcn.00401c60
lea ebx, [ebx]
mov eax, dword [0x544eb0]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push 4
lea edx, [ebp - 0x10]
push edx
push eax
mov dword [ebp - 0x10], ebx
call edi
test eax, eax
jne 0x401793
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4018c0
jmp 0x40179c
cmp dword [ebp - 0x1c], ebx
je 0x4018c0
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x401760
inc eax
push eax
call fcn.00429546
mov ecx, dword [ebp - 0x10]
inc ecx
push ecx
mov esi, eax
push ebx
push esi
call fcn.0042fdd0
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x544eb0]
add esp, 0x10
push ebx
lea edx, [ebp - 0x1c]
push edx
push eax
push esi
push ecx
call edi
test eax, eax
je 0x4018b7
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x4018b7
mov eax, dword [ebp - 0x10]
cmp ecx, eax
jb 0x4018b7
mov edi, dword [esi]
mov ecx, dword [ebp + 0x3c]
sub eax, 4
mov edx, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x50], edx
jae 0x401804
lea ecx, [ebp + 0x3c]
cmp dword [ebp + 0x34], edx
mov edx, dword [ebp + 0x20]
jae 0x40180f
lea edx, [ebp + 0x20]
push eax
lea eax, [esi + 4]
push eax
push edx
lea edx, [ebp + 0x54]
push edx
mov edx, edi
call fcn.00403a10
push esi
call fcn.00429469
mov eax, dword [ebp + 0x68]
add esp, 0x14
cmp eax, ebx
jne 0x401838
lea ecx, [ebp + 0x54]
jmp 0x401755
add eax, 4
mov dword [ebp - 0x10], eax
add eax, 4
push eax
call fcn.00429546
mov esi, eax
mov eax, dword [ebp - 0x10]
mov dword [esi], eax
mov dword [esi + 4], edi
mov eax, dword [ebp + 0x58]
add esp, 4
cmp dword [ebp + 0x6c], 0x10
jae 0x401860
lea eax, [ebp + 0x58]
mov ecx, dword [ebp + 0x68]
push ecx
push eax
lea edx, [esi + 8]
push edx
call fcn.004360d0
mov eax, dword [ebp - 0x10]
mov edx, dword [0x544eb0]
add esp, 0xc
push ebx
lea ecx, [ebp - 0x24]
push ecx
add eax, 4
push eax
push esi
push edx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call fcn.00429469
add esp, 4
cmp edi, ebx
je 0x4018ad
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x10]
jb 0x4018ad
lea ecx, [ebp + 0x54]
jmp 0x401755
lea ecx, [ebp + 0x54]
call fcn.00401c60
jmp 0x4018c0
push esi
call fcn.00429469
add esp, 4
mov ecx, dword [0x544eb0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [0x544eb4]
push edx
call esi
lea ecx, [ebp + 0x1c]
call fcn.00401c60
lea ecx, [ebp + 0x38]
call fcn.00401c60
lea ecx, [ebp]
call fcn.00401c60
lea ecx, [ebp - 0x14]
call fcn.00405e10
lea ecx, [ebp - 0x18]
call fcn.00405e10
xor eax, eax
jmp 0x401949
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401927
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401946
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
lea esp, [ebp - 0x50]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x174]
xor ecx, ebp
call fcn.00428ddf
add ebp, 0x178
mov esp, ebp
pop ebp
ret