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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov edx, ecx
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x48
mov eax, dword [edx + 0x10]
mov edi, dword [ecx + 8]
mov esi, dword [ecx]
mov ecx, dword [ecx + 0xc]
mov dword [ebp - 0x3c], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x30], eax
mov eax, dword [edx + 0x18]
mov edx, dword [edx + 4]
mov dword [ebp - 0x34], eax
movzx eax, word [edi]
test edx, edx
je 0x403448
or ecx, 0x80000000
test ax, ax
je 0x40374f
mov ebx, edi
lea esi, [esi]
nop
add ebx, 2
cmp word [ebx], 0
jne 0x403400
sub ebx, edi
lea eax, [ebx + 2]
add ebx, 0x14
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], 0x40dc06
mov dword [ebp - 0x3c], ecx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], edi
mov edx, eax
mov dword [eax], 0x57494e45
mov edi, dword [ebp - 0x38]
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ecx
mov eax, 1
jmp 0x4034a0
mov ebx, dword [ebp - 0x30]
add ebx, 0x12
test ax, ax
je 0x403815
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403460
sub eax, edi
mov dword [ebp - 0x38], ecx
add ebx, eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x38]
mov edx, eax
mov dword [eax], 0x57494e45
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ecx
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403490
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 0x4034a8
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x4035d8
mov eax, dword [esi + 0x24]
lea edi, [ebp - 0x2c]
mov dword [ebp - 0x20], 0
mov ebx, dword [edx + 4]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x30], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [ebp - 0x30]
sub esp, 0x14
test eax, eax
jne 0x4035b8
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x403558
test byte [section..data], 2
jne 0x403760
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov esi, dword [ebp - 0x34]
xor ebx, ebx
mov dword [esi], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword [0x40b06c]
mov dword [ebp - 0x30], edx
mov dword [esp + 4], eax
mov eax, dword [esi + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x30]
sub esp, 8
cmp eax, 0x102
je 0x40378f
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x30]
sub esp, 0x10
test eax, eax
je 0x40351d
lea esi, [esi]
cmp ebx, dword [ebp - 0x2c]
je 0x403600
test byte [section..data], 2
jne 0x403720
mov eax, 0x1d
jmp 0x403533
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x38], edx
mov eax, dword [edx + 8]
mov dword [esp + 8], ebx
mov ebx, dword [ebp - 0x3c]
lea eax, [edx + eax*2 + 0x10]
mov dword [esp], eax
mov dword [esp + 4], ebx
call sub.ucrtbase.dll_memcpy
mov edx, dword [ebp - 0x38]
jmp 0x4034c4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
mov edx, dword [ebp - 0x30]
sub esp, 0x14
test eax, eax
jne 0x4036f0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x403691
test byte [section..data], 2
je 0x40352a
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], edx
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 + 8], str.process_send_command
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x40b000
mov dword [esp], 1
call fcn.00401700
mov edx, dword [ebp - 0x30]
jmp 0x40352a
mov eax, dword [0x40b06c]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x24]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x30]
sub esp, 8
cmp eax, 0x102
je 0x403802
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x30]
sub esp, 0x10
test eax, eax
je 0x403646
lea esi, [esi]
nop
mov ecx, dword [ebp - 0x2c]
mov ebx, 1
cmp ecx, 4
je 0x40353a
test byte [section..data], 2
jne 0x4037a2
mov eax, 0x1e
jmp 0x403533
mov dword [ebp - 0x30], edx
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], 0x40b000
mov dword [esp], 1
call fcn.00401700
mov edx, dword [ebp - 0x30]
jmp 0x4035ca
mov ebx, 0x14
mov dword [ebp - 0x30], 2
jmp 0x403414
mov dword [ebp - 0x30], edx
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], 0x40b000
mov dword [esp], 1
call fcn.00401700
mov edx, dword [ebp - 0x30]
jmp 0x40352a
test byte [section..data], 2
jne 0x4037d9
mov eax, 0x41d
jmp 0x403533
mov dword [ebp - 0x30], edx
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], 0x40b000
mov dword [esp], 1
call fcn.00401700
mov edx, dword [ebp - 0x30]
jmp 0x40370e
mov dword [esp + 0xc], str.sending_command_timed_out_n
mov dword [esp + 8], str.process_send_command
mov dword [esp + 4], 0x40b000
mov dword [esp], 1
call fcn.00401700
mov edx, dword [ebp - 0x30]
jmp 0x403798
test byte [section..data], 2
je 0x403798
mov dword [esp + 0xc], str.receiving_command_result_timed_out_n
jmp 0x4037e1
mov dword [ebp - 0x38], edi
mov edi, dword [ebp - 0x3c]
jmp 0x40341b