Function at 0x6ac4a580
Capabilities:
Check for time delay via gettickcount
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xfc
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0xcc], 0
call sub.kernel32.dll_GetTickCount
test esi, esi
mov dword [ebp - 0xe0], eax
jle 0x6ac4a605
mov edi, dword [0x6ac59080]
test edi, edi
jne 0x6ac4a5c5
jmp 0x6ac4a5cf
cmp esi, eax
je 0x6ac4a610
mov edi, dword [edi + 0xbc]
test edi, edi
je 0x6ac4a5cf
mov eax, dword [edi + 0xb8]
test eax, eax
jne 0x6ac4a5b7
lea ebx, [ebp - 0x68]
mov dword [esp + 8], esi
mov dword [esp + 4], str.No_info_known_about_the_port.__i_n
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp], ebx
call fcn.6ac488c0
mov eax, 0xffffffff
mov dword [0x6ac59a80], 9
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [edi + 0x78], 4
je 0x6ac4a780
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xdc], eax
lea esi, [ebp - 0xc8]
jmp 0x6ac4a69f
mov eax, dword [ebp - 0xc8]
test al, 8
je 0x6ac4a64a
mov ecx, dword [edi + 0x74]
and eax, 0xfffffff7
add dword [ecx + 0x18], 1
mov dword [ebp - 0xc8], eax
test al, 4
je 0x6ac4a65e
mov ecx, dword [edi + 0x74]
and eax, 0xfffffffb
add dword [ecx + 0x20], 1
mov dword [ebp - 0xc8], eax
test al, 0x10
je 0x6ac4a669
mov eax, dword [edi + 0x74]
add dword [eax + 0x24], 1
call sub.kernel32.dll_GetTickCount
mov ecx, dword [edi + 0x64]
movzx ecx, byte [ecx + 0x15]
test cl, cl
je 0x6ac4a68a
imul ecx, ecx, 0x64
sub eax, dword [ebp - 0xe0]
cmp eax, ecx
jge 0x6ac4a605
cmp dword [ebp - 0xc0], ebx
jae 0x6ac4a7ca
cmp ebx, 1
jle 0x6ac4a7ca
mov eax, dword [ebp - 0xdc]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_ClearCommError
sub esp, 0xc
test eax, eax
jne 0x6ac4a630
call sub.kernel32.dll_GetLastError
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x10
mov dword [esp + 0xc], 0x400
mov dword [esp + 4], 0
mov dword [esp], 0x1100
mov ecx, eax
lea eax, [ebp - 0xb8]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], eax
mov dword [ebp - 0xe4], ecx
call sub.kernel32.dll_FormatMessageA
mov eax, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0xe4]
sub esp, 0x1c
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x68]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], 0x200
mov dword [esp + 0x10], str.src_windows_termios.c
mov dword [esp + 8], str.Error_0x_x_at__s__d_:__s_n
mov dword [esp + 4], 0x50
mov dword [esp], eax
call fcn.6ac4d6f0
lea eax, [ebp - 0x68]
mov dword [esp], eax
mov byte [ebp - 0x19], 0
call fcn.6ac488a0
mov eax, dword [ebp - 0xb8]
mov dword [esp], eax
call sub.kernel32.dll_LocalFree
sub esp, 4
mov dword [esp], 1
call sub.kernel32.dll_Sleep
sub esp, 4
jmp 0x6ac4a669
call sub.msvcrt.dll_clock
mov ecx, dword [edi + 0x64]
mov dword [ebp + 0x10], ebx
movzx ecx, byte [ecx + 0x15]
imul ecx, ecx, 0x64
lea esi, [eax + ecx]
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xdc], eax
mov ebx, eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.6ac49210
mov dword [esp], 1
call sub.kernel32.dll_Sleep
sub esp, 4
call sub.msvcrt.dll_clock
cmp esi, eax
jg 0x6ac4a7a3
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jle 0x6ac4a605
lea esi, [edi + 0x7c]
mov dword [ebp - 0xe4], 0
mov eax, dword [edi + 0x8c]
mov dword [edi + 0x88], 0
mov dword [edi + 0x84], 0
mov dword [ebp - 0xcc], 0
mov dword [esp], eax
call sub.kernel32.dll_ResetEvent
lea eax, [ebp - 0xcc]
sub esp, 4
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xe4]
add eax, dword [ebp + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_ReadFile
mov edx, dword [ebp - 0xcc]
add dword [ebp - 0xe4], edx
sub ebx, edx
mov dword [ebp - 0xe8], ebx
sub esp, 0x14
test eax, eax
jne 0x6ac4aa60
call sub.kernel32.dll_GetLastError
cmp eax, 0xea
je 0x6ac4aa40
cmp eax, 0x3e5
je 0x6ac4a941
cmp eax, 0x6d
je 0x6ac4aa50
call sub.kernel32.dll_GetLastError
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x10
mov dword [esp + 0xc], 0x400
mov dword [esp + 4], 0
mov dword [esp], 0x1100
mov ebx, eax
lea eax, [ebp - 0xc8]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
call sub.kernel32.dll_FormatMessageA
mov eax, dword [ebp - 0xc8]
sub esp, 0x1c
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x68]
mov dword [esp], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x5dc
mov dword [esp + 0x10], str.src_windows_termios.c
mov dword [esp + 8], str.Error_0x_x_at__s__d_:__s_n
mov dword [esp + 4], 0x50
call fcn.6ac4d6f0
mov dword [esp], ebx
mov byte [ebp - 0x19], 0
call fcn.6ac488a0
mov eax, dword [ebp - 0xc8]
mov dword [esp], eax
call sub.kernel32.dll_LocalFree
sub esp, 4
mov dword [esp], 1
call sub.kernel32.dll_Sleep
mov eax, 0xffffffff
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e4
jne 0x6ac4aa60
lea eax, [ebp - 0xcc]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_GetOverlappedResult
sub esp, 0x10
test eax, eax
je 0x6ac4a931
mov eax, dword [ebp - 0xcc]
mov ebx, dword [ebp - 0xe8]
add dword [ebp - 0xe4], eax
sub ebx, eax
test ebx, ebx
jle 0x6ac4aa80
call sub.kernel32.dll_GetTickCount
mov edx, eax
mov eax, dword [edi + 0x64]
sub edx, dword [ebp - 0xe0]
movzx eax, byte [eax + 0x15]
mov dword [esp + 8], edx
mov dword [esp + 4], str.size___0:_spent_ld_have_d_n
mov dword [ebp - 0xec], edx
imul eax, eax, 0x64
mov dword [esp + 0xc], eax
lea eax, [ebp - 0xb8]
mov dword [esp], eax
mov dword [ebp - 0xe8], eax
call sub.msvcrt.dll_sprintf
mov eax, dword [ebp - 0xe8]
mov dword [esp], eax
call fcn.6ac488c0
mov eax, dword [edi + 0x64]
mov edx, dword [ebp - 0xec]
movzx eax, byte [eax + 0x15]
test al, al
je 0x6ac4a9f0
imul eax, eax, 0x64
cmp edx, eax
jge 0x6ac4aa91
mov eax, dword [ebp - 0xcc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xe8]
mov dword [esp + 4], str.end_nBytes_ld_
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
mov eax, dword [ebp - 0xe8]
mov dword [esp], eax
call fcn.6ac488c0
mov dword [esp], str.ERROR_IO_PENDING_n
call fcn.6ac488c0
test ebx, ebx
jg 0x6ac4a7df
mov eax, dword [ebp - 0xe4]
jmp 0x6ac4a5fd
mov dword [esp], str.ERROR_MORE_DATA_n
call fcn.6ac488c0
jmp 0x6ac4aa2a
mov dword [esp], str.ERROR_BROKEN_PIPE_n
call fcn.6ac488c0
jmp 0x6ac4aa2a
mov eax, dword [ebp - 0xdc]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.6ac49210
mov eax, dword [ebp - 0xe4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0xb8]
mov dword [ebp - 0xe8], edx
jmp 0x6ac4a9f6
mov dword [esp], 0x6ac54926
call fcn.6ac488c0
mov eax, dword [ebp - 0xe4]
jmp 0x6ac4a5fd