Function at 0x4033d0
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 ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
test edi, edi
mov cx, word [ebx]
jne 0x403568
test cx, cx
mov eax, dword [ebp + 0x1c]
lea edi, [eax + 0x12]
mov eax, ebx
je 0x40375c
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x403400
sub eax, ebx
mov dword [ebp - 0x28], ecx
add edi, eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x28]
mov esi, eax
mov dword [eax], 0x57494e45
mov eax, dword [ebp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 4], edi
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x403430
sub eax, ebx
sar eax, 1
inc eax
mov dword [esi + 8], eax
lea eax, [esi + 0x10]
jmp 0x40344b
mov cx, word [ebx]
add eax, 2
add ebx, 2
test cx, cx
mov word [eax - 2], cx
jne 0x403448
mov ebx, dword [ebp + 0x1c]
test ebx, ebx
jne 0x403650
mov eax, dword [ebp + 8]
mov ebx, dword [esi + 4]
lea edi, [ebp - 0x24]
mov dword [ebp - 0x18], 0
mov eax, dword [eax + 0x24]
mov dword [esp + 0xc], edi
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x14], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x403528
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x4034d8
test byte [0x41801c], 2
jne 0x403720
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x403543
mov eax, dword [0x41808c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
cmp eax, 0x102
push ecx
push ecx
je 0x403794
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], edi
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x4034ba
nop
cmp ebx, dword [ebp - 0x24]
je 0x4035c8
test byte [0x41801c], 2
jne 0x4036f0
mov eax, 0x1d
mov edx, dword [ebp + 0x20]
mov dword [edx], eax
xor eax, eax
mov dword [esp], esi
mov dword [ebp - 0x28], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x28]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp + 0x14]
or esi, 0x80000000
test cx, cx
mov dword [ebp + 0x14], esi
je 0x4036da
mov edi, ebx
nop
add edi, 2
cmp word [edi], 0
jne 0x403580
sub edi, ebx
lea eax, [edi + 2]
add edi, 0x14
mov dword [ebp + 0x1c], eax
mov ecx, 0x41abe6
mov dword [esp], edi
mov dword [ebp - 0x28], ecx
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp + 0x18], ebx
mov esi, eax
mov ebx, dword [ebp - 0x28]
mov dword [eax], 0x57494e45
mov eax, dword [ebp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 4], edi
xor ecx, ecx
mov eax, 1
jmp 0x40343e
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], 4
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x4036c8
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x403672
test byte [0x41801c], 2
je 0x4034c7
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 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], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x4034c7
mov eax, dword [esi + 8]
mov edx, dword [ebp + 0x1c]
mov dword [esp + 8], edx
mov edx, dword [ebp + 0x18]
lea eax, [esi + eax*2 + 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.ucrtbase.dll_memcpy
jmp 0x403465
mov eax, dword [0x41808c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
cmp eax, 0x102
push edx
push edx
je 0x4037d3
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], edi
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x40360b
lea esi, [esi]
mov ecx, dword [ebp - 0x24]
cmp ecx, 4
jne 0x403749
mov eax, 1
jmp 0x40354a
mov edi, 0x14
mov dword [ebp + 0x1c], 2
jmp 0x403594
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], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x40353e
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], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x4034c7
test byte [0x41801c], 2
jne 0x403766
mov eax, 0x1e
jmp 0x403543
mov ecx, ebx
mov ebx, dword [ebp + 0x18]
jmp 0x403599
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], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x403752
test byte [0x41801c], 2
jne 0x4037ad
mov eax, dword [ebp + 0x20]
mov dword [eax], 0x41d
xor eax, eax
jmp 0x40354a
mov dword [esp + 0xc], str.sending_command_timed_out_n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x40379d
test byte [0x41801c], 2
je 0x40379d
mov dword [esp + 0xc], str.receiving_command_result_timed_out_n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x41801c
mov dword [esp], 1
call fcn.004016d0
jmp 0x40379d