Function at 0x6ac4a300
Capabilities:
Write file on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov ecx, dword [ebp + 8]
test ecx, ecx
jle 0x6ac4a367
mov edi, dword [0x6ac59080]
test edi, edi
jne 0x6ac4a32f
jmp 0x6ac4a339
cmp ecx, eax
je 0x6ac4a370
mov edi, dword [edi + 0xbc]
test edi, edi
je 0x6ac4a339
mov eax, dword [edi + 0xb8]
test eax, eax
jne 0x6ac4a321
lea ebx, [ebp - 0x68]
mov dword [esp + 8], ecx
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
mov eax, dword [edi + 0x58]
lea ebx, [edi + 0x90]
mov dword [edi + 0x9c], 0
lea esi, [ebp - 0x70]
mov dword [edi + 0x98], 0
mov dword [ebp - 0x7c], eax
mov eax, dword [edi + 0xa0]
mov dword [esp], eax
call sub.kernel32.dll_ResetEvent
mov eax, dword [ebp + 0x10]
sub esp, 4
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x6ac4a3ff
mov eax, dword [edi + 0x58]
or eax, 4
mov dword [edi + 0x58], eax
mov dword [esp + 4], eax
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_SetCommMask
mov eax, dword [ebp - 0x7c]
mov dword [edi + 0x5c], 1
mov dword [edi + 0x58], eax
mov eax, dword [ebp - 0x70]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 0x64
mov eax, dword [edi + 0xa0]
mov dword [esp], eax
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e5
je 0x6ac4a4fc
mov dword [esp], str.serial_write_error_n
call fcn.6ac488c0
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 - 0x6c]
mov dword [esp + 0x10], eax
mov dword [esp + 8], ebx
call sub.kernel32.dll_FormatMessageA
mov eax, dword [ebp - 0x6c]
sub esp, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x51f
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x68]
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], ebx
call fcn.6ac4d6f0
mov dword [esp], ebx
mov byte [ebp - 0x19], 0
call fcn.6ac488a0
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.kernel32.dll_LocalFree
sub esp, 4
mov dword [esp], 1
call sub.kernel32.dll_Sleep
sub esp, 4
call sub.msvcrt.dll__errno
mov dword [eax], 5
mov dword [ebp - 0x70], 0xffffffff
jmp 0x6ac4a3cc
call sub.kernel32.dll_GetLastError
cmp eax, 0x3e4
jne 0x6ac4a523
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, dword [edi + 0x60]
mov dword [esp], eax
call sub.kernel32.dll_GetOverlappedResult
sub esp, 0x10
test eax, eax
je 0x6ac4a4f0
jmp 0x6ac4a3cc
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 - 0x6c]
mov dword [esp + 0x10], eax
mov dword [esp + 8], ebx
call sub.kernel32.dll_FormatMessageA
mov eax, dword [ebp - 0x6c]
sub esp, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x52b
jmp 0x6ac4a484