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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
jne 0x40aa67
xor eax, eax
jmp 0x40ac60
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0
je 0x40aa7e
cmp dword [ebp - 0x28], 1
je 0x40aa87
jmp 0x40aac7
mov dword [ebp - 0x18], 0x40000000
jmp 0x40aace
cmp dword [ebp + 0xc], 0
jne 0x40aaa1
push str.CTISMSIPCClient___buffer_to_receive_reply_is_a_NULL_pointer__n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40ac60
mov edx, dword [ebp - 0x24]
cmp dword [edx + 4], 0
je 0x40aabe
push str.CTISMSIPCClient___Windows_9X_ONLY_can_be_a_SMSIPCSVRTYPE_ACCESS_INBOUND_type__n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40ac60
mov dword [ebp - 0x18], 0xc0000000
jmp 0x40aace
xor eax, eax
jmp 0x40ac60
mov byte [ebp - 0xd], 1
movzx eax, byte [ebp - 0xd]
cmp eax, 1
jne 0x40ab78
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push 0
push 3
push 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40ab0d
jmp 0x40ab78
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
je 0x40ab3c
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTISMSIPCClient___Could_not_open_pipe._Error_code_:__d__pipe_name_:__s_n
call fcn.00405640
add esp, 0xc
xor eax, eax
jmp 0x40ac60
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x40ab73
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTISMSIPCClient___Could_not_open_pipe._All_pipe_instances_are_busy._Error_code_:__d__pipe_name_:__s_n
call fcn.00405640
add esp, 0xc
xor eax, eax
jmp 0x40ac60
jmp 0x40aad2
mov dword [ebp - 8], 0
push 0
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40abae
push str.CTISMSIPCClient___SetNamedPipeHandleState_failed_n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40ac60
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0x8c1c
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40abe3
push str.CTISMSIPCClient___WriteFile_failed_n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40ac60
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 0
je 0x40ac4c
mov ecx, dword [ebp - 0x24]
cmp dword [ecx + 0xc], 1
jne 0x40ac4c
cmp dword [ebp + 0xc], 0
je 0x40ac38
push 0
lea edx, [ebp - 0x1c]
push edx
push 0x8c1c
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40ac30
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40ac30
jmp 0x40ac36
cmp dword [ebp - 0x14], 0
je 0x40abff
jmp 0x40ac4c
push str.CTISMSIPCClient___buffer_to_receive_reply_is_a_NULL_pointer__n
call fcn.00405640
add esp, 4
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret 0xc