Function at 0x1004a550
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x38]
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], esi
cmp eax, esi
je 0x1004a7e5
cmp ebx, esi
jbe 0x1004a7e5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edi
xor ebp, ebp
jmp 0x1004a592
xor esi, esi
cmp byte [esp + 0x4c], 0
mov ecx, dword [esp + 0x3c]
je 0x1004a5b0
mov eax, dword [ecx + 4]
cmp eax, esi
je 0x1004a5b0
cmp dword [eax], 0x2694
je 0x1004a6f4
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x14], esi
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x4c]
mov esi, ebx
sub esi, ebp
push esi
add edx, ebp
push edx
mov edx, dword [esp + 0x50]
push edx
call eax
test eax, eax
je 0x1004a73e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
test ecx, ecx
jbe 0x1004a5f2
add ebp, ecx
cmp ecx, esi
jne 0x1004a650
cmp esi, ebx
je 0x1004a6da
cmp byte [esp + 0x48], 0
je 0x1004a6da
push ebx
push ebp
push esi
push ecx
movzx ecx, di
push ecx
push str.Retry__u_:_WriteComm__lu__lu_:_re_write_completely___total__lu__lu_.
lea edi, [esp + 0x3c]
mov dword [esp + 0x3c], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x40], 0x9e
mov byte [esp + 0x44], 0
mov dword [esp + 0x48], str._DEBUG:
mov dword [esp + 0x4c], str.DA_cmd::WriteData
call fcn.10017c90
mov edi, dword [esp + 0x2c]
add esp, 0x18
jmp 0x1004a6da
test ecx, ecx
jne 0x1004a676
inc edi
mov dword [esp + 0x14], edi
cmp byte [esp + 0x48], cl
je 0x1004a6cb
push ebx
push ebp
push esi
movzx edx, di
push ecx
push edx
mov dword [esp + 0x3c], 0xa8
push str.Retry__u_:_WriteComm__lu__lu_:_timeout___total__lu__lu_.
jmp 0x1004a696
cmp ecx, esi
jae 0x1004a6cb
cmp byte [esp + 0x48], 0
je 0x1004a6cb
push ebx
push ebp
push esi
movzx eax, di
push ecx
push eax
mov dword [esp + 0x3c], 0xae
push str.Retry__u_:_WriteComm__lu__lu_:_write_incompletely___total__lu__lu_.
lea edi, [esp + 0x3c]
mov dword [esp + 0x3c], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov byte [esp + 0x44], 0xd2
mov dword [esp + 0x48], str._WARN:
mov dword [esp + 0x4c], str.DA_cmd::WriteData
call fcn.10017c90
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
add esp, 0x18
sub eax, dword [esp + 0x20]
cmp eax, 0x2710
jae 0x1004a793
cmp ebp, ebx
jb 0x1004a590
push 0
call sub.KERNEL32.dll_Sleep
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x2c
ret 0x14
mov ecx, eax
mov edx, dword [ecx]
push edx
push ecx
push str.m_p_stopflag_0x_08X__lu__force_to_stop_
lea edi, [esp + 0x30]
mov dword [esp + 0x30], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x34], 0x86
mov byte [esp + 0x38], 0
mov dword [esp + 0x3c], str._DEBUG:
mov dword [esp + 0x40], str.DA_cmd::WriteData
call fcn.10017c90
mov eax, 0x3e8
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x2c
ret 0x14
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push ebx
push ebp
push eax
push esi
movzx edx, di
push ecx
push edx
push str.Retry__u_:_WriteComm__lu__lu_:_Err__u___total__lu__lu_.
lea edi, [esp + 0x40]
mov dword [esp + 0x40], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x44], 0x8d
mov byte [esp + 0x48], 0xff
mov dword [esp + 0x4c], str._ERROR:
mov dword [esp + 0x50], str.DA_cmd::WriteData
call fcn.10017c90
add esp, 0x1c
mov eax, 3
pop edi
pop esi
pop ebp
add esp, 0x2c
ret 0x14
push ebx
movzx eax, di
push ebp
push eax
push 0x2710
push esi
push ecx
push eax
push str.Retry__u_:_WriteComm__lu__lu_:_exceed_timeout__u_ms__retry__u_times_fail___total__lu__lu_.
lea edi, [esp + 0x44]
mov dword [esp + 0x44], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x48], 0xb4
mov byte [esp + 0x4c], 0xff
mov dword [esp + 0x50], str._ERROR:
mov dword [esp + 0x54], str.DA_cmd::WriteData
call fcn.10017c90
add esp, 0x20
mov eax, 0x63
pop edi
pop esi
pop ebp
add esp, 0x2c
ret 0x14
push ebx
push eax
push str.invalid_arguments__write_buf_0x_08X___write_len__lu_.
lea edi, [esp + 0x30]
mov dword [esp + 0x30], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x34], 0x74
mov byte [esp + 0x38], 0xff
mov dword [esp + 0x3c], str._ERROR:
mov dword [esp + 0x40], str.DA_cmd::WriteData
call fcn.10017c90
add esp, 0xc
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x2c
ret 0x14