Function at 0x40c300
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 0x40c347
xor eax, eax
jmp 0x40c540
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0
je 0x40c35e
cmp dword [ebp - 0x28], 1
je 0x40c367
jmp 0x40c3a7
mov dword [ebp - 0x18], 0x40000000
jmp 0x40c3ae
cmp dword [ebp + 0xc], 0
jne 0x40c381
push str.CTISMSIPCClient___buffer_to_receive_reply_is_a_NULL_pointer__n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40c540
mov edx, dword [ebp - 0x24]
cmp dword [edx + 4], 0
je 0x40c39e
push str.CTISMSIPCClient___Windows_9X_ONLY_can_be_a_SMSIPCSVRTYPE_ACCESS_INBOUND_type__n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40c540
mov dword [ebp - 0x18], 0xc0000000
jmp 0x40c3ae
xor eax, eax
jmp 0x40c540
mov byte [ebp - 0xd], 1
movzx eax, byte [ebp - 0xd]
cmp eax, 1
jne 0x40c458
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 0x40c3ed
jmp 0x40c458
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
je 0x40c41c
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 0x40c540
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 0x40c453
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 0x40c540
jmp 0x40c3b2
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 0x40c48e
push str.CTISMSIPCClient___SetNamedPipeHandleState_failed_n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40c540
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0x344
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 0x40c4c3
push str.CTISMSIPCClient___WriteFile_failed_n
call fcn.00405640
add esp, 4
xor eax, eax
jmp 0x40c540
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 0
je 0x40c52c
mov ecx, dword [ebp - 0x24]
cmp dword [ecx + 0xc], 1
jne 0x40c52c
cmp dword [ebp + 0xc], 0
je 0x40c518
push 0
lea edx, [ebp - 0x1c]
push edx
push 0x344
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 0x40c510
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40c510
jmp 0x40c516
cmp dword [ebp - 0x14], 0
je 0x40c4df
jmp 0x40c52c
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