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

Disassembly:
push ebp
lea ebp, [esp - 0x5c]
sub esp, 0x2c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x50], 0
mov dword [ebp + 0x54], 0
push 0x14c
push 0
lea eax, [ebp - 0x160]
push eax
call fcn.100061d0
add esp, 0xc
mov dword [ebp + 0x4c], 0
call fcn.10003880
movzx ecx, al
test ecx, ecx
je 0x10003c57
push 0x104
push 0
lea edx, [ebp - 0x264]
push edx
call fcn.100061d0
add esp, 0xc
call fcn.10002bd0
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x264], eax
mov eax, dword [ebp + 0x74]
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 - 0x25c]
push edx
mov eax, dword [ebp + 0x64]
push eax
push 1
call fcn.10002ec0
add esp, 0x18
movzx ecx, al
mov dword [ebp + 0x4c], ecx
cmp dword [ebp + 0x4c], 0
je 0x10003c52
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x48], 0
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x3c], 0
call fcn.100034c0
lea edx, [ebp + 8]
push edx
mov eax, dword [ebp + 0x64]
push eax
call fcn.10003540
add esp, 8
push 0x18
push 0
lea ecx, [ebp + 0x18]
push ecx
call fcn.100061d0
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x14]
push edx
call fcn.100061d0
add esp, 0xc
mov eax, dword [ebp + 0x6c]
mov dword [ebp - 0x260], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10005680
mov dword [ebp - 0x258], eax
mov ecx, dword [ebp + 0x74]
mov dword [ebp - 0x254], ecx
cmp dword [ebp + 0x6c], 0xf0
jbe 0x10003b68
push 0xc
push 0
lea edx, [ebp - 4]
push edx
call fcn.100061d0
add esp, 0xc
mov dword [ebp + 0x18], 0x18
push 0
mov eax, dword [ebp + 0x6c]
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp + 0x1c], eax
mov ecx, dword [ebp + 0x6c]
mov dword [ebp + 0x24], ecx
push 0
push 0
push 0
push 0xf001f
mov edx, dword [ebp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp + 0x28], eax
cmp dword [ebp + 0x28], 0
je 0x10003b4d
mov eax, dword [ebp + 0x6c]
push eax
mov ecx, dword [ebp + 0x68]
push ecx
mov edx, dword [ebp + 0x28]
push edx
call fcn.10006390
add esp, 0xc
mov eax, dword [ebp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp + 0x28], 0
mov dword [ebp - 4], 0xc
mov ecx, dword [ebp + 0x6c]
mov dword [ebp], ecx
lea edx, [ebp + 0x18]
mov dword [ebp + 0x44], edx
lea eax, [ebp - 4]
mov dword [ebp + 0x48], eax
jmp 0x10003b8d
mov ecx, dword [ebp + 0x6c]
push ecx
mov edx, dword [ebp + 0x68]
push edx
lea eax, [ebp - 0x250]
push eax
call fcn.10006390
add esp, 0xc
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x48], 0
mov dword [ebp + 0x40], 0x104
lea ecx, [ebp + 0x40]
push ecx
lea edx, [ebp - 0x264]
push edx
push 0
mov eax, dword [ebp + 0x48]
push eax
mov ecx, dword [ebp + 0x44]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp + 8]
push eax
lea ecx, [ebp + 0x3c]
push ecx
call dword [0x10023fe4]
test eax, eax
jne 0x10003bc9
mov edx, dword [ebp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SendIpcMessage:_NtConnectPort_complete_n
call fcn.10003600
add esp, 4
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x1c], 0
je 0x10003bf0
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x264], 0
je 0x10003c10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x264], eax
je 0x10003c10
mov dword [ebp + 0x38], 1
jmp 0x10003c17
mov dword [ebp + 0x38], 0
mov edx, dword [ebp + 0x38]
mov dword [ebp + 0x50], edx
cmp dword [ebp + 0x50], 0
je 0x10003c45
cmp dword [ebp + 0x74], 0
je 0x10003c45
mov eax, dword [ebp - 0x264]
sub eax, 1
push eax
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x54], eax
jmp 0x10003c52
push str.SendIpcMessage:__LpcPortThread_did_not_fill_in_the_process_ID_n
call fcn.10003600
add esp, 4
jmp 0x10003dfa
push 0
lea ecx, [ebp + 0x30]
push ecx
lea edx, [ebp - 0x160]
push edx
mov eax, dword [ebp + 0x64]
push eax
call fcn.10003610
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x10003dfa
mov edx, dword [ebp + 0x74]
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 + 0x64]
push edx
push 1
call fcn.10002ec0
add esp, 0x18
movzx eax, al
mov dword [ebp + 0x4c], eax
cmp dword [ebp + 0x4c], 0
je 0x10003de6
mov ecx, dword [ebp - 0x15c]
push ecx
push 0
push 0x100040
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x54], eax
cmp dword [ebp + 0x54], 0
je 0x10003de6
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 + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x10003de6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10005680
mov dword [ebp + 0x14], eax
push 0
lea edx, [ebp + 0x58]
push edx
push 4
lea eax, [ebp + 0x6c]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003dcc
cmp dword [ebp + 0x58], 4
jne 0x10003dcc
push 0
lea edx, [ebp + 0x58]
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 0x10003dcc
cmp dword [ebp + 0x58], 4
jne 0x10003dcc
push 0
lea edx, [ebp + 0x58]
push edx
push 4
lea eax, [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003dcc
cmp dword [ebp + 0x58], 4
jne 0x10003dcc
push 0
lea edx, [ebp + 0x58]
push edx
push 4
lea eax, [ebp + 0x74]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003dcc
cmp dword [ebp + 0x58], 4
jne 0x10003dcc
push 0
lea edx, [ebp + 0x58]
push edx
mov eax, dword [ebp + 0x6c]
push eax
mov ecx, dword [ebp + 0x68]
push ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003dcc
mov eax, dword [ebp + 0x58]
cmp eax, dword [ebp + 0x6c]
jne 0x10003dcc
mov dword [ebp + 0x34], 1
jmp 0x10003dd3
mov dword [ebp + 0x34], 0
mov ecx, dword [ebp + 0x34]
mov dword [ebp + 0x50], ecx
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x54], 0
je 0x10003e84
cmp dword [ebp + 0x50], 0
je 0x10003e78
cmp dword [ebp + 0x74], 0
je 0x10003e78
mov edx, dword [ebp + 0x7c]
push edx
push 5
call fcn.10005860
push eax
mov eax, dword [ebp + 0x54]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.100038b0
add esp, 0x10
movzx edx, al
test edx, edx
je 0x10003e71
mov eax, dword [ebp + 0x7c]
push eax
mov ecx, dword [ebp + 0x78]
push ecx
mov edx, dword [ebp + 0x54]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.100038b0
add esp, 0x10
movzx ecx, al
test ecx, ecx
je 0x10003e68
mov edx, dword [ebp + 0x74]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x70]
push ecx
call fcn.10006390
add esp, 0xc
jmp 0x10003e6f
mov dword [ebp + 0x50], 0
jmp 0x10003e78
mov dword [ebp + 0x50], 0
mov edx, dword [ebp + 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10003e91
push str._SendIpcMessage:_ProcessID_was_not_filled_in_by_server_n
call fcn.10003600
add esp, 4
cmp dword [ebp + 0x4c], 0
je 0x10003ea3
lea eax, [ebp - 0x28]
push eax
call fcn.10002af0
add esp, 4
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x50]
add ebp, 0x5c
mov esp, ebp
pop ebp
ret 0x1c