Function at 0x1005bb70
Capabilities:
Check if file exists
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101224d8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x1016e750]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], edx
mov eax, ecx
mov dword [ebp - 0x38], eax
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x44], edi
push 0xffffffffffffffff
push eax
mov dword [ebp - 4], 1
lea eax, [ebp - 0x28]
push dword [ebp + 8]
push str.PipeIpcClient__s___d_:_hPipe0x_x
push eax
call fcn.10044f30
add esp, 0x14
mov byte [ebp - 4], 2
mov ecx, str.PipeIpc
mov edx, dword [ebp - 0x28]
call fcn.10043b30
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x28]
mov eax, ebx
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1005bc01
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0x1012ec60
mov ecx, edi
mov dword [esi], 0xffffffff
call fcn.10024680
push dword [ebp + 8]
lea eax, [ebp - 0x40]
push str..pipe_s
push eax
call fcn.10044f30
add esp, 0xc
xor esi, esi
mov byte [ebp - 4], 3
push esi
push esi
push 3
push esi
push esi
push 0x40000000
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1005bd5f
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1005bcb8
inc esi
lea eax, [ebp - 0x28]
push esi
push str.PipeIpcClient:_CreateFile.NotFoundRetry__d
push eax
call fcn.10044f30
add esp, 0xc
mov byte [ebp - 4], 4
mov ecx, str.PipeIpc
mov edx, dword [ebp - 0x28]
call fcn.10043b30
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005bca7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 6
jl 0x1005bd3c
cmp edi, 0xe7
jne 0x1005bf0f
push 0xbb8
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x1005bd3c
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
jne 0x1005bebe
inc esi
lea eax, [ebp - 0x2c]
push esi
push str.PipeIpcClient:_WaitNamedPipe.NotFoundRetry__d
push eax
call fcn.10044f30
add esp, 0xc
mov byte [ebp - 4], 5
mov ecx, str.PipeIpc
mov edx, dword [ebp - 0x2c]
call fcn.10043b30
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005bd2b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 6
jge 0x1005bebe
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1005bc50
push 0
push 0
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
xor esi, esi
lea ecx, [ebp - 0x3c]
push 0x1012ec60
mov dword [ebp - 0x50], esi
call fcn.10023fc0
xor ebx, ebx
mov byte [ebp - 4], 7
cmp dword [ebp - 0x34], ebx
je 0x1005bdf9
call fcn.10104507
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x34]
push str._s._d._d._x
push eax
call fcn.10044f30
add esp, 0x18
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 8
call fcn.100244b0
mov byte [ebp - 4], 7
or ecx, 0xffffffff
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005bde8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x3c]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x30]
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
push str._d_s_s
push eax
call fcn.10044f30
add esp, 0x14
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x30]
cmp dword [eax - 4], 1
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0x38], ecx
jle 0x1005be35
push ecx
lea ecx, [ebp - 0x30]
call fcn.10024570
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
push 0
lea edx, [ebp - 0x50]
push edx
lea ecx, [ecx*2 + 2]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x30]
mov edi, eax
push dword [ecx - 8]
push ecx
call fcn.1010374b
mov edx, eax
add esp, 8
test edx, edx
js 0x1005c157
mov ecx, dword [ebp - 0x30]
cmp edx, dword [ecx - 8]
jg 0x1005c157
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x30]
mov word [eax + edx*2], cx
test edi, edi
jne 0x1005bf30
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1005be93
push ebx
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
push eax
push str.PipeIpcClient:_WriteFile_hPipe__failed__LE_d
push ecx
call fcn.10044f30
add esp, 0xc
call fcn.1005bb00
add esp, 4
push 0xffffffffffffffff
call esi
xor esi, esi
jmp 0x1005c095
call edi
push eax
push 0xe7
lea eax, [ebp - 0x2c]
push str.PipeIpcClient:_failed_waiting_for_pipe__Err_d__WaitNamedPipe.LE_d
push eax
call fcn.10044f30
add esp, 0x10
mov byte [ebp - 4], 6
mov ecx, str.PipeIpc
mov edx, dword [ebp - 0x2c]
call fcn.10043b30
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005bf29
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
jmp 0x1005c0d8
push ecx
mov eax, esp
push edi
push str.PipeIpcClient:_error_opening_pipe__Err_d
push eax
call fcn.10044f30
add esp, 0xc
call fcn.1005bb00
add esp, 4
xor esi, esi
jmp 0x1005c0d8
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, esp
test ebx, ebx
je 0x1005c076
push str.PipeIpcClient:_waiting_for_reply
push eax
call fcn.10044f30
add esp, 8
call fcn.1005bb00
add esp, 4
push dword [ebp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1005c071
push ecx
mov eax, esp
push str.PipeIpcClient:_reply_received
push eax
call fcn.10044f30
add esp, 8
call fcn.1005bb00
push str..ReplyMap
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x38]
call fcn.10026820
add esp, 8
push dword [eax]
push 0
push 5
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x28], eax
call fcn.10024080
cmp dword [ebp - 0x28], 0
je 0x1005c071
push str.NtQuerySection
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
push 0x1013a6ac
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push ecx
push 0x10
lea ecx, [ebp - 0x24]
push ecx
push 0
push dword [ebp - 0x28]
call eax
push 0
push 0
push 0
push 4
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1005c06c
push 0x7c
push eax
call fcn.101033a1
add esp, 8
mov esi, eax
call fcn.10022690
push eax
mov eax, dword [ebp - 0x2c]
mov ecx, esi
sub ecx, eax
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.10026b90
mov byte [ebp - 4], 0xa
push dword [ebp - 0x34]
call fcn.1010463d
mov edx, dword [ebp - 0x54]
add esp, 4
mov ecx, dword [ebp - 0x44]
mov dword [edx], eax
lea eax, [esi + 2]
push eax
call fcn.100245f0
push dword [ebp - 0x2c]
mov esi, 1
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x34]
call fcn.10024080
push dword [ebp - 0x28]
call edi
push ebx
call edi
jmp 0x1005c091
push str._PipeIpcClient:_FAILED_waiting_for_reply
push eax
call fcn.10044f30
add esp, 8
call fcn.1005bb00
add esp, 4
mov esi, 1
push 0xffffffffffffffff
call edi
mov byte [ebp - 4], 7
or ebx, 0xffffffff
mov edx, dword [ebp - 0x30]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005c0b8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005c0d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005c0f8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1005c118
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 0xc]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x1005c139
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10103392
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.100223c0
int3