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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
movzx edx, word [edi]
test ecx, ecx
jne 0x403290
mov eax, dword [ebp + 0x1c]
lea esi, [eax + 0x12]
mov eax, edi
test dx, dx
je 0x403410
nop
add eax, 2
cmp word [eax], 0
jne 0x403090
sub eax, edi
add esi, eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, eax
mov dword [eax], 0x57494e45
mov eax, dword [ebp + 0x14]
mov dword [edx + 4], esi
mov dword [edx + 0xc], eax
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4030c0
sub eax, edi
sar eax, 1
add eax, 1
mov dword [edx + 8], eax
xor eax, eax
lea esi, [esi]
movzx ecx, word [edi + eax]
mov word [edx + eax + 0x10], cx
add eax, 2
test cx, cx
jne 0x4030d8
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x4032f0
mov eax, dword [ebx + 0x24]
mov esi, dword [edx + 4]
lea edi, [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 8], esi
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [ebp - 0x28]
sub esp, 0x14
test eax, eax
jne 0x4031c0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x403168
test byte [section..data], 2
jne 0x4033d0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x4031d7
mov eax, dword [0x41706c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x28]
sub esp, 8
cmp eax, 0x102
je 0x403451
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x28], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x28]
sub esp, 0x10
test eax, eax
je 0x40314d
lea esi, [esi]
cmp esi, dword [ebp - 0x24]
je 0x4031f8
test byte [section..data], 2
jne 0x4033a0
mov eax, 0x1d
mov ebx, dword [ebp + 0x20]
mov dword [ebx], eax
xor ebx, ebx
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x28], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
mov edx, dword [ebp - 0x28]
sub esp, 0x14
test eax, eax
jne 0x403370
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x403318
test byte [section..data], 2
je 0x40315a
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], str.service_protocol_error___failed_to_read_pipe_r___d__count___ld__n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x417000
mov dword [esp], 1
mov dword [ebp - 0x28], edx
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x28]
jmp 0x40315a
or dword [ebp + 0x14], 0x80000000
test dx, dx
je 0x4033ff
mov esi, edi
lea esi, [esi]
add esi, 2
cmp word [esi], 0
jne 0x4032a8
sub esi, edi
lea eax, [esi + 2]
add esi, 0x14
mov dword [ebp + 0x1c], eax
mov ecx, 0x418be6
mov dword [ebp - 0x28], ecx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0x18], edi
mov dword [eax], 0x57494e45
mov edx, eax
mov eax, dword [ebp + 0x14]
mov dword [edx + 4], esi
mov edi, ecx
mov dword [edx + 0xc], eax
mov eax, 1
jmp 0x4030d0
mov esi, dword [ebp + 0x1c]
mov eax, dword [edx + 8]
mov dword [ebp - 0x28], edx
mov dword [esp + 8], esi
mov esi, dword [ebp + 0x18]
lea eax, [edx + eax*2 + 0x10]
mov dword [esp], eax
mov dword [esp + 4], esi
call sym._memcpy
mov edx, dword [ebp - 0x28]
jmp 0x4030f4
mov eax, dword [0x41706c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x28]
sub esp, 8
cmp eax, 0x102
je 0x403493
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x28], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x28]
sub esp, 0x10
test eax, eax
je 0x403242
nop
mov ecx, dword [ebp - 0x24]
mov ebx, 1
cmp ecx, 4
je 0x4031de
test byte [section..data], 2
jne 0x40341a
mov eax, 0x1e
jmp 0x4031d7
mov dword [esp + 0xc], str.service_protocol_error___failed_to_write_pipe__n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x417000
mov dword [esp], 1
mov dword [ebp - 0x28], edx
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x28]
jmp 0x4031d2
mov dword [esp + 0xc], str.service_protocol_error___failed_to_write_pipe__n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x417000
mov dword [esp], 1
mov dword [ebp - 0x28], edx
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x28]
jmp 0x40315a
mov dword [ebp + 0x1c], 2
mov esi, 0x14
jmp 0x4032bc
mov ecx, edi
mov edi, dword [ebp + 0x18]
jmp 0x4032c1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.service_protocol_error___failed_to_read_pipe_r___d__count___ld__n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x417000
mov dword [esp], 1
mov dword [ebp - 0x28], edx
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x28]
jmp 0x40338e
test byte [section..data], 2
jne 0x40346a
mov eax, dword [ebp + 0x20]
xor ebx, ebx
mov dword [eax], 0x41d
jmp 0x4031de
mov dword [esp + 0xc], str.sending_command_timed_out_n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x417000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x28]
jmp 0x40345a
test byte [section..data], 2
je 0x40345a
mov dword [esp + 0xc], str.receiving_command_result_timed_out_n
jmp 0x403472