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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x10053008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov dword [ebp - 0x20], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
xor edi, edi
push 0x200
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
push esi
push ebx
mov dword [ebp - 0x24], eax
movups xmmword [ebp - 0x18], xmm0
mov dword [ebp - 8], esi
call fcn.10005470
mov eax, dword [ebp - 0x1c]
add esp, 0xc
test eax, eax
jne 0x100019ee
push str.___COMSendAndReceiveBytes:_No_data_to_write
call fcn.10002f20
add esp, 4
xor esi, esi
mov dword [ebp - 0x1c], 0
xor edi, edi
test ebx, ebx
jne 0x10001a91
push str.___COMSendAndReceiveBytes:_No_data_to_read
call fcn.10002f20
add esp, 4
jmp 0x10001b42
push dword [ebp + 0x10]
push eax
push str.Sending:
call fcn.100031f0
mov eax, dword [ebp + 0x24]
add esp, 0xc
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov eax, dword [ebp + 0x10]
nop dword [eax]
push 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push ecx
sub eax, esi
push eax
mov eax, dword [ebp - 0x1c]
add eax, esi
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc edi
test eax, eax
jne 0x10001a73
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x10001a76
push str.___COMSendAndReceiveBytes:_Write_error
call fcn.10002f20
add esp, 4
jmp 0x10001bf6
add esi, dword [ebp - 0x28]
mov eax, dword [ebp + 0x10]
cmp esi, eax
je 0x100019c9
cmp edi, dword [ebp + 0x20]
jbe 0x10001a30
push edi
push str.___COMSendAndReceiveBytes:_Error:_Send_Retry_count_exceeded__repeats:__d
jmp 0x10001bee
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], edx
nop dword [eax]
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x2c], 0
jne 0x10001aba
push str.___Receiving_Data
call fcn.10002f20
add esp, 4
push 0
lea eax, [ebp - 0x2c]
push eax
mov eax, 0x1ff
sub eax, esi
push eax
lea eax, [ebx + esi]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
inc dword [ebp - 0x1c]
inc edi
test eax, eax
jne 0x10001afe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x10001b01
push edi
push eax
push str.___COMSendAndReceiveBytes:_Read_error:__d__read:__d
call fcn.10002f20
add esp, 0xc
jmp 0x10001bf6
add esi, dword [ebp - 0x2c]
test esi, esi
jle 0x10001b14
push 0xd
push ebx
call fcn.10004840
add esp, 8
test eax, eax
jne 0x10001b33
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp + 0x24]
ja 0x10001be8
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10001aa0
push esi
push ebx
push str.Received:
call fcn.100031f0
add esp, 0xc
push edi
push str.___COMSendAndReceiveBytes:_Success__read:__d
call fcn.10002f20
dec esi
add esp, 8
add esi, ebx
cmp byte [esi], 0xd
je 0x10001b7b
push str.___COMSendAndReceiveBytes:_Error__unexpected_character_at_buffer__end
call fcn.10002f20
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100034e6
mov esp, ebp
pop ebp
ret
push 0xd
push ebx
call fcn.10004840
add esp, 8
cmp eax, esi
jne 0x10001ba5
mov ecx, dword [ebp - 0x24]
sub eax, ebx
pop edi
inc eax
pop esi
mov dword [ecx], eax
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100034e6
mov esp, ebp
pop ebp
ret
mov edi, eax
inc eax
push 0xd
push eax
call fcn.10004840
add esp, 8
cmp eax, esi
jne 0x10001ba5
mov ecx, dword [ebp - 0x24]
lea eax, [edi + 1]
sub esi, edi
push esi
push eax
push ebx
mov dword [ecx], esi
call fcn.10004ef0
mov eax, dword [ebp - 0x24]
add esp, 0xc
mov eax, dword [eax]
pop edi
pop esi
mov byte [ebx + eax], 0
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100034e6
mov esp, ebp
pop ebp
ret
push edi
push str.___COMSendAndReceiveBytes:_Error:_read_timeout__read:__d
call fcn.10002f20
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, 2
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100034e6
mov esp, ebp
pop ebp
ret