Function at 0x409f60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43d0e0
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x449d40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push 0x441f00
mov dword [ebp - 0x48], ebx
call fcn.00428f41
add esp, 4
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x441f00
call fcn.00428f41
add esp, 4
push 0x441f00
call fcn.00428f41
add esp, 4
test eax, eax
je 0x409fdb
push 0x441f28
call fcn.00428b9d
add esp, 4
lea eax, [ebx + 0x24]
jmp 0x40a1bf
call fcn.00409df0
test al, al
jne 0x409ffb
push str.Odin:_com_port_not_found._n
call fcn.0040fe60
add esp, 4
mov eax, 0x20
jmp 0x40a1bf
lea ecx, [ebp - 0x4c]
call fcn.00401690
mov dword [ebp - 4], ebx
mov edx, dword [eax]
xor eax, eax
mov word [ebp - 0x2c], ax
mov eax, edx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a020
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040bb70
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a05c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 4
lea ecx, [ebp - 0x2c]
call fcn.0040ba40
mov eax, dword [ebp - 0x2c]
mov edi, 8
cmp dword [ebp - 0x18], edi
jae 0x40a079
lea eax, [ebp - 0x2c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a0c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Odin:_Open_COM_failed_with__u_n
call fcn.0040fe60
add esp, 8
cmp dword [ebp - 0x18], edi
jb 0x40a0b7
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00427a0a
add esp, 4
mov eax, 0x21
jmp 0x40a1bf
lea edx, [ebp - 0x40]
push edx
push esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], 0x3e8
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x44]
push eax
push 5
push str.ATZ_r_n
push esi
call edi
test eax, eax
jne 0x40a128
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Odin:_11_Write_failed_with__u_n
call fcn.0040fe60
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x2c]
call fcn.00403380
mov eax, 0x22
jmp 0x40a1bf
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
lea ecx, [ebp - 0x44]
push ecx
push 9
push str.ATFUS__r_n
push esi
call edi
test eax, eax
jne 0x40a154
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Odin:_22_Write_failed_with__u_n
jmp 0x40a107
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x48]
mov edi, edi
call fcn.00409ee0
test al, al
jne 0x40a17e
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 2
cmp esi, 0x3c
jl 0x40a160
jmp 0x40a189
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x3c
jle 0x40a1aa
push str.Odin:_Failed_to_wait_DL_mode..._n
call fcn.0040fe60
add esp, 4
lea ecx, [ebp - 0x2c]
call fcn.00403380
mov eax, 0x19
jmp 0x40a1bf
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x2c]
call fcn.00403380
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00427a15
mov esp, ebp
pop ebp
ret