Function at 0x40aa78
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f988
push 0x41c160
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x38], esi
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
mov edi, 0x425b34
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0x40000000
push 3
push esi
push esi
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x40ab1e
call ebx
mov dword [ebp - 0x38], eax
cmp eax, 2
je 0x40aaf6
cmp eax, 0xe7
jne 0x40ab09
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x40ab17
jmp 0x40aab9
push 0x425ac8
push 3
call fcn.0040148c
pop ecx
pop ecx
push 2
pop eax
jmp 0x40ab81
push 0x425a9c
push 3
call fcn.0040148c
jmp 0x40ab7c
mov eax, 0xe7
jmp 0x40ab81
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], 2
push esi
push esi
lea ecx, [ebp - 0x34]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
mov dword [ebp - 0x3c], eax
cmp eax, esi
jne 0x40ab43
push 0x425a5c
jmp 0x40ab63
push esi
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x3c], eax
cmp eax, esi
jne 0x40ab90
push 0x425a38
push 3
call fcn.0040148c
pop ecx
pop ecx
call ebx
mov dword [ebp - 0x38], eax
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
pop ecx
pop ecx
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
mov edi, dword [ebp + 0x14]
mov dword [edi], esi
push esi
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x3c], eax
cmp eax, esi
jne 0x40ac43
call ebx
mov dword [ebp - 0x38], eax
cmp eax, 0x26
je 0x40ac3e
mov edi, 0x3e5
cmp eax, edi
jne 0x40ac28
push dword [ebp + 0x18]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40abf8
mov esi, edi
jmp 0x40ac2a
push esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x3c], eax
cmp eax, esi
jne 0x40ac1b
call ebx
mov dword [ebp - 0x38], eax
cmp eax, 0x26
je 0x40ac3e
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x14]
add dword [eax], ecx
xor eax, eax
mov dword [ebp - 0x38], eax
mov esi, eax
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
pop ecx
pop ecx
mov eax, esi
jmp 0x40ab81
mov dword [ebp - 0x38], esi
jmp 0x40ac2a
mov eax, dword [ebp - 0x1c]
add dword [edi], eax
mov dword [ebp - 4], esi
call fcn.0040ac72
cmp dword [ebp - 0x3c], esi
je 0x40ab95
or dword [ebp - 4], 0xffffffff
call fcn.0040ac86
jmp 0x40ab7e