Function at 0x42f660
Capabilities:
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x164], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x160], 0
push 0x148
push 0
lea eax, [ebp - 0x15c]
push eax
call fcn.0041d590
add esp, 0xc
mov dword [ebp - 8], 0
call fcn.0042f570
movzx ecx, al
test ecx, ecx
je 0x42f99d
push 0x104
push 0
lea edx, [ebp - 0x270]
push edx
call fcn.0041d590
add esp, 0xc
call fcn.004318d0
mov dword [ebp - 0x268], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x270], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x20], eax
push 0
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov edx, dword [ebp - 0x268]
push edx
mov eax, dword [ebp + 8]
push eax
push 1
call fcn.004310e0
add esp, 0x18
movzx ecx, al
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x42f998
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x2bc], 0
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 0
call fcn.0042fd00
lea edx, [ebp - 0x29c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042fc60
add esp, 8
push 0x18
push 0
lea ecx, [ebp - 0x2b8]
push ecx
call fcn.0041d590
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x280]
push edx
call fcn.0041d590
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x26c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00435910
mov dword [ebp - 0x264], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x260], ecx
cmp dword [ebp + 0x10], 0xf0
jbe 0x42f878
push 0xc
push 0
lea edx, [ebp - 0x294]
push edx
call fcn.0041d590
add esp, 0xc
mov dword [ebp - 0x2b8], 0x18
push 0
mov eax, dword [ebp + 0x10]
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x2b4], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2ac], ecx
push 0
push 0
push 0
push 0xf001f
mov edx, dword [ebp - 0x2b4]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2a8], eax
cmp dword [ebp - 0x2a8], 0
je 0x42f84b
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x2a8]
push edx
call fcn.00421c50
add esp, 0xc
mov eax, dword [ebp - 0x2a8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x294], 0xc
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x290], ecx
lea edx, [ebp - 0x2b8]
mov dword [ebp - 0x2a0], edx
lea eax, [ebp - 0x294]
mov dword [ebp - 0x2bc], eax
jmp 0x42f8a3
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x25c]
push eax
call fcn.00421c50
add esp, 0xc
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x2bc], 0
mov dword [ebp - 0x288], 0x104
lea ecx, [ebp - 0x288]
push ecx
lea edx, [ebp - 0x270]
push edx
push 0
mov eax, dword [ebp - 0x2bc]
push eax
mov ecx, dword [ebp - 0x2a0]
push ecx
lea edx, [ebp - 0x280]
push edx
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ebp - 0x284]
push ecx
call dword [0x45dec0]
test eax, eax
jne 0x42f8f7
mov edx, dword [ebp - 0x284]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SendIpcMessage:_NtConnectPort_complete_n
call fcn.0042fc50
add esp, 4
mov eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x2b4], 0
je 0x42f927
mov ecx, dword [ebp - 0x2b4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x270], 0
je 0x42f94a
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x270], eax
je 0x42f94a
mov dword [ebp - 0x2cc], 1
jmp 0x42f954
mov dword [ebp - 0x2cc], 0
mov edx, dword [ebp - 0x2cc]
mov dword [ebp - 0x164], edx
cmp dword [ebp - 0x164], 0
je 0x42f98b
cmp dword [ebp + 0x18], 0
je 0x42f98b
mov eax, dword [ebp - 0x270]
sub eax, 1
push eax
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
jmp 0x42f998
push str.SendIpcMessage:__LpcPortThread_did_not_fill_in_the_process_ID_n
call fcn.0042fc50
add esp, 4
jmp 0x42fb81
push 0
lea ecx, [ebp - 0x2c0]
push ecx
lea edx, [ebp - 0x160]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00432130
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x42fb81
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x20], edx
push 0
lea eax, [ebp - 0x28]
push eax
push 0
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
push 1
call fcn.004310e0
add esp, 0x18
movzx eax, al
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x42fb67
mov ecx, dword [ebp - 0x15c]
push ecx
push 0
push 0x100040
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x42fb67
push 2
push 0
push 0
lea edx, [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov eax, dword [ebp - 0x154]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x42fb67
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00435910
mov dword [ebp - 0x2c8], eax
push 0
lea edx, [ebp - 0x2c4]
push edx
push 4
lea eax, [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42fb44
cmp dword [ebp - 0x2c4], 4
jne 0x42fb44
push 0
lea edx, [ebp - 0x2c4]
push edx
push 4
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42fb44
cmp dword [ebp - 0x2c4], 4
jne 0x42fb44
push 0
lea edx, [ebp - 0x2c4]
push edx
push 4
lea eax, [ebp - 0x2c8]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42fb44
cmp dword [ebp - 0x2c4], 4
jne 0x42fb44
push 0
lea edx, [ebp - 0x2c4]
push edx
push 4
lea eax, [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42fb44
cmp dword [ebp - 0x2c4], 4
jne 0x42fb44
push 0
lea edx, [ebp - 0x2c4]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42fb44
mov eax, dword [ebp - 0x2c4]
cmp eax, dword [ebp + 0x10]
jne 0x42fb44
mov dword [ebp - 0x2d0], 1
jmp 0x42fb4e
mov dword [ebp - 0x2d0], 0
mov ecx, dword [ebp - 0x2d0]
mov dword [ebp - 0x164], ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x2c0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x42fc14
cmp dword [ebp - 0x164], 0
je 0x42fc08
cmp dword [ebp + 0x18], 0
je 0x42fc08
mov edx, dword [ebp + 0x20]
push edx
push 5
call fcn.004370c0
push eax
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00431800
add esp, 0x10
movzx edx, al
test edx, edx
je 0x42fbfe
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00431800
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x42fbf2
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00421c50
add esp, 0xc
jmp 0x42fbfc
mov dword [ebp - 0x164], 0
jmp 0x42fc08
mov dword [ebp - 0x164], 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42fc21
push str._SendIpcMessage:_ProcessID_was_not_filled_in_by_server_n
call fcn.0042fc50
add esp, 4
cmp dword [ebp - 8], 0
je 0x42fc33
lea eax, [ebp - 0x28]
push eax
call fcn.00431720
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x164]
mov esp, ebp
pop ebp
ret 0x1c