Function at 0x100519f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x74
mov eax, dword [esp + 0x84]
push ebx
mov ebx, dword [esp + 0xa0]
push ebp
mov ebp, dword [esp + 0x80]
push esi
mov esi, dword [esp + 0x94]
push edi
push ebx
push esi
push eax
push str.CHAR:_Length_u__Packet_Length_u
lea edi, [esp + 0x7c]
mov dword [esp + 0x7c], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x80], 0xb18
mov byte [esp + 0x84], 0
mov dword [esp + 0x88], str._DEBUG:
mov dword [esp + 0x8c], str.DA_cmd::SendDataWithRetransmission
call fcn.10017c90
mov ecx, dword [esp + 0xa4]
add esp, 0x10
xor eax, eax
push eax
xor edi, edi
add ecx, 0xffffffff
push ebx
adc esi, 0xffffffff
push esi
push ecx
mov dword [esp + 0x48], edi
call fcn.10176970
mov esi, eax
add esi, 1
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], edi
je 0x10051ca0
mov dword [esp + 0x30], edi
lea ecx, [ecx]
xor eax, eax
push eax
push ebx
push eax
push edi
call fcn.101769e0
dec esi
mov ecx, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
cmp edi, esi
jne 0x10051ab9
mov edi, dword [esp + 0x94]
sub edi, ecx
mov dword [esp + 0x20], edi
jmp 0x10051abf
mov dword [esp + 0x20], ebx
mov edi, ebx
xor eax, eax
cmp edi, eax
mov dword [esp + 0x1c], eax
jle 0x10051af0
mov edx, dword [esp + 0x90]
add ecx, edx
mov dx, ax
movzx si, byte [ecx + eax]
inc eax
add dx, si
cmp eax, edi
jl 0x10051ad5
mov word [esp + 0x1c], dx
jmp 0x10051af0
mov esi, dword [esp + 0x8c]
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ebp
mov ebx, 1
mov byte [esp + 0x28], 0x5a
call fcn.1004a550
test eax, eax
jne 0x10051e0d
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x40]
push eax
push ebx
add ecx, edx
push ecx
push esi
push ebp
mov ebx, edi
call fcn.1004a550
test eax, eax
jne 0x10051e19
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 0x1c]
push 0
push 1
lea edx, [esp + 0x20]
push edx
push esi
shr eax, 8
push ebp
mov ebx, 2
mov byte [esp + 0x2c], al
mov byte [esp + 0x2d], cl
call fcn.1004a550
test eax, eax
jne 0x10051e28
push eax
push 0x2710
push 1
mov byte [esp + 0x94], al
lea eax, [esp + 0x94]
push eax
push esi
push ebp
mov ebx, 1
call fcn.1004a830
test eax, eax
jne 0x10051e37
mov al, byte [esp + 0x88]
cmp al, 0x69
je 0x10051cac
cmp al, 0xa5
jne 0x10051c5f
push 0
push 0x2710
push ebx
lea ecx, [esp + 0x38]
push ecx
push esi
push ebp
mov ebx, 4
call fcn.1004a830
test eax, eax
jne 0x10051ed0
mov eax, dword [esp + 0x2c]
movzx ecx, byte [esp + 0x2f]
movzx esi, al
shl esi, 8
movzx edx, ah
movzx eax, byte [esp + 0x2e]
or esi, edx
shl esi, 8
or esi, eax
shl esi, 8
or esi, ecx
push esi
mov dword [esp + 0x70], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x74], 0xb74
mov byte [esp + 0x78], 0xff
mov dword [esp + 0x7c], str._ERROR:
mov dword [esp + 0x80], str.DA_cmd::SendDataWithRetransmission
call sym.FlashToolLib.v1.dll_StatusToString
push eax
push str.__s_
lea edi, [esp + 0x74]
call fcn.10017c90
add esp, 8
cmp esi, 0xbfa
je 0x10051c54
cmp esi, 0xbf6
je 0x10051c54
cmp esi, 0xbf7
je 0x10051c54
cmp esi, 0xbf9
jne 0x10051edf
mov al, byte [esp + 0x88]
mov edi, dword [esp + 0x20]
cmp al, 0x96
jne 0x10051af0
push str.STOP_
lea edi, [esp + 0x70]
mov dword [esp + 0x70], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov dword [esp + 0x74], 0xb82
mov byte [esp + 0x78], 0xd2
mov dword [esp + 0x7c], str._WARN:
mov dword [esp + 0x80], str.DA_cmd::SendDataWithRetransmission
call fcn.10017c90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
mov eax, dword [ebp + 4]
xor edi, edi
cmp eax, edi
je 0x10051cc1
cmp dword [eax], 0x2694
je 0x10051e46
cmp dword [esp + 0xb0], edi
je 0x10051de2
mov ecx, dword [esp + 0x30]
fnstcw word [esp + 0x14]
mov ebx, dword [esp + 0xa8]
xor eax, eax
xor edx, edx
add ecx, dword [esp + 0x20]
mov dword [esp + 0x50], edi
adc edx, eax
add ecx, dword [esp + 0x9c]
mov dword [esp + 0x60], edi
adc edx, dword [esp + 0xa0]
mov dword [esp + 0x48], ecx
mov eax, edx
mov esi, edx
and eax, 0x7fffffff
mov dword [esp + 0x4c], eax
fild qword [esp + 0x48]
mov eax, dword [esp + 0xa4]
and esi, 0x80000000
mov dword [esp + 0x54], esi
fild qword [esp + 0x50]
mov dword [esp + 0x58], eax
mov eax, ebx
mov esi, ebx
fchs
and eax, 0x7fffffff
faddp st(1)
mov dword [esp + 0x5c], eax
fild qword [esp + 0x58]
and esi, 0x80000000
mov dword [esp + 0x64], esi
fild qword [esp + 0x60]
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x20], eax
fchs
faddp st(1)
fdivp st(1)
fld qword [0x1024b9e0]
fmul st(1), st(0)
fldcw word [esp + 0x20]
fxch st(1)
fistp qword [esp + 0x20]
mov eax, dword [esp + 0x20]
mov esi, eax
sub esi, dword [esp + 0x38]
fldcw word [esp + 0x14]
je 0x10051de0
mov esi, dword [esp + 0xb4]
push esi
mov esi, dword [esp + 0xa8]
push ebx
push esi
push edx
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
mov dword [esp + 0x48], eax
push ecx
test eax, eax
jge 0x10051dad
fadd dword [0x1024b9e8]
fdiv st(1)
fnstcw word [esp + 0x28]
movzx eax, word [esp + 0x28]
fmulp st(1)
or eax, 0xc00
mov dword [esp + 0x34], eax
fldcw word [esp + 0x34]
fistp dword [esp + 0x34]
mov cl, byte [esp + 0x34]
movzx edx, cl
push edx
fldcw word [esp + 0x2c]
call dword [esp + 0xc8]
jmp 0x10051de2
fstp st(0)
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0xac]
add dword [esp + 0x30], ecx
inc eax
mov dword [esp + 0x34], eax
cmp eax, dword [esp + 0x3c]
jae 0x10051ca0
mov esi, dword [esp + 0x3c]
mov ebx, ecx
mov edi, eax
jmp 0x10051a90
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
mov eax, 5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
push edi
push 1
lea edx, [esp + 0xb4]
push edx
push esi
push ebp
mov byte [esp + 0xc0], 0x96
call fcn.1004a550
mov dword [esp + 0x6c], str.FlashToolLib_sv5_common_generic_src_da_cmd.cpp
mov byte [esp + 0x74], 0xff
mov dword [esp + 0x78], str._ERROR:
mov dword [esp + 0x7c], str.DA_cmd::SendDataWithRetransmission
lea edi, [esp + 0x6c]
test eax, eax
je 0x10051eaa
push eax
push str.STOP_transmission_fails__
mov dword [esp + 0x78], 0xb61
call fcn.10017c90
add esp, 8
mov eax, 9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
push 0
push str.STOP_transmission_OKAY__
mov dword [esp + 0x78], 0xb64
call fcn.10017c90
add esp, 8
mov eax, 0x3e8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
mov eax, 6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x30