Function at 0x408810
Capabilities:
Check for time delay via queryperformancecounter
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x532b8d
mov eax, dword fs:[0]
push eax
sub esp, 0x1e8
mov eax, dword [0x587770]
xor eax, esp
mov dword [esp + 0x1b0], eax
push ebx
push esi
push edi
mov eax, dword [0x587770]
xor eax, esp
push eax
lea eax, [esp + 0x1f8]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00416a2a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40886c
push 0x80004005
call fcn.00401ee0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x200], 0
call fcn.00416a2a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4088a1
push 0x80004005
call fcn.00401ee0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x20], ebx
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0x204], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
call dword [sym.imp.STBLLIB.dll_COM_is_Open]
test eax, eax
je 0x4088df
call dword [sym.imp.STBLLIB.dll_COM_Close]
push 0
call dword [sym.imp.STBLLIB.dll_TARGET_SetComIntType]
fild dword [esi + 0xc]
mov eax, dword [esi + 0xc]
test eax, eax
jge 0x4088f7
fadd dword [0x565a30]
mov ecx, dword [esi + 0x10]
fstp dword [esp]
movzx edx, byte [esi + 8]
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esi]
push edx
push eax
push ecx
call dword [sym.imp.STBLLIB.dll_SetCOMSettings]
add esp, 0x14
call dword [sym.imp.STBLLIB.dll_COM_Open]
cmp al, 2
jne 0x40897a
push 0x15
push str.COM_already_opened__r_n
lea ecx, [esp + 0x24]
call fcn.00401b00
mov edi, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 3
push edi
push 0x465
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebx - 0x10]
mov byte [esp + 0x200], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408967
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x200], 0xffffffff
lea eax, [edi - 0x10]
jmp 0x4092fe
test al, al
je 0x4089be
push 0x12
push str.Open_COM_failed__r_n
lea ecx, [esp + 0x24]
call fcn.00401b00
mov edi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 3
push edi
push 0x465
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebx - 0x10]
mov byte [esp + 0x200], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40895b
push 0x3e8
call dword [sym.imp.STBLLIB.dll_SetTimeOut]
push 0
call dword [sym.imp.STBLLIB.dll_STBL_SetEcho]
add esp, 8
push 0xd
push str.Connect......
lea ecx, [esp + 0x24]
call fcn.00401b00
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 2
push ecx
push 0x465
push edx
call edi
call dword [sym.imp.STBLLIB.dll_STBL_Init_BL]
cmp al, 0x12
je 0x4092a6
test al, al
jne 0x4092a6
push str.Success_r_n
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 2
push eax
push 0x465
push ecx
call edi
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x43]
push eax
mov byte [esp + 0x47], 0
call dword [sym.imp.STBLLIB.dll_STBL_GET]
add esp, 8
test al, al
je 0x408a88
push str.Read_ID_fail__r_n
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 3
push ecx
push 0x465
push edx
call edi
lea ecx, [esp + 0x20]
call fcn.00401fb0
lea ecx, [esp + 0x1c]
call fcn.00401fb0
jmp 0x409317
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x5b]
push ecx
mov byte [esp + 0x5f], 2
call dword [sym.imp.STBLLIB.dll_STBL_GET_ID]
add esp, 8
call dword [sym.imp.STBLLIB.dll_STBL_READOUT_PERM_UNPROTECT]
test al, al
jne 0x409283
call dword [sym.imp.STBLLIB.dll_STBL_Init_BL]
lea ecx, [esp + 0x1c]
test al, al
je 0x408ad8
push str.Fail__r_n
call fcn.00401bf0
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
push 3
push edx
push 0x465
push eax
jmp 0x408a6f
push str.Erase......
call fcn.00401bf0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 2
push ecx
push 0x465
push edx
call edi
xor ebx, ebx
push ebx
push 0xff
call dword [sym.imp.STBLLIB.dll_STBL_ERASE]
add esp, 8
lea ecx, [esp + 0x1c]
test al, al
je 0x408b2c
push str.Fail_r_n
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 3
push eax
push 0x465
push ecx
jmp 0x408a6f
push str.Success_r_n
call fcn.00401bf0
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
push 2
push edx
push 0x465
push eax
call edi
lea ecx, [esi + 0x18]
push ecx
lea ecx, [esp + 0x38]
call fcn.00401740
mov byte [esp + 0x200], 2
mov ax, word [esp + 0x64]
cmp al, 4
jne 0x408b85
cmp ah, 0x14
jne 0x408b72
push str.STSTM32_High_density_256K.STmap
jmp 0x408b7c
cmp ah, 0x10
jne 0x408b85
push str.STSTM32_Med_density_128K.STmap
lea ecx, [esp + 0x38]
call fcn.00409500
lea edx, [esp + 0x2b]
push edx
push ebx
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0xc8]
push ecx
lea edx, [esp + 0x68]
push edx
push ebx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x43], 0
mov dword [esp + 0x80], ebx
mov dword [esp + 0x70], ebx
call fcn.00401eb0
push eax
call sub.Files.dll_FILES_GetMemoryMapping
push 0x110
call fcn.0050bafb
mov ebx, eax
mov dword [ebx + 0x108], 0
movzx eax, word [esp + 0x74]
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
add eax, eax
push eax
mov dword [esp + 0x4c], ebx
call fcn.0050bafb
add esp, 0x20
lea ecx, [esp + 0x2b]
push ecx
push ebx
lea edx, [esp + 0x70]
push edx
mov dword [ebx + 0x10c], eax
lea eax, [esp + 0xc8]
push eax
lea ecx, [esp + 0x68]
push ecx
push 0
lea ecx, [esp + 0x4c]
call fcn.00401eb0
push eax
call sub.Files.dll_FILES_GetMemoryMapping
mov edx, dword [esp + 0x80]
push edx
call dword [sym.imp.STBLLIB.dll_SetPaketSize]
mov ecx, dword [ebx + 0x10c]
mov eax, 1
add esp, 0x1c
cmp dword [ebx + 0x108], eax
jl 0x408c56
add ecx, 0x18
mov dword [ecx], 1
inc eax
add ecx, 0x28
cmp eax, dword [ebx + 0x108]
jle 0x408c44
lea eax, [esi + 0x1c]
push eax
lea ecx, [esp + 0x54]
call fcn.00401740
push 1
lea ecx, [esp + 0x50]
push ecx
push 0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x20c], 3
call fcn.00401eb0
push eax
call sub.Files.dll_FILES_ImageFromFile
add esp, 0xc
cmp eax, 0x12340000
jne 0x409257
push 0
lea ecx, [esp + 0x54]
call fcn.00401eb0
mov edx, dword [esp + 0x4c]
push eax
push edx
call sub.Files.dll_FILES_SetImageName
mov eax, dword [esp + 0x54]
push 0
push 2
push ebx
push eax
call sub.Files.dll_FILES_FilterImageForOperation
add esp, 0x18
push str.Download......
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 2
push ecx
push 0x465
push edx
call edi
push str.Download...0_
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x14]
push eax
push 0
push 0x466
push ecx
call edi
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x38]
push edx
push eax
mov dword [esp + 0x40], 0
call sub.Files.dll_FILES_GetImageNbElement
add esp, 8
cmp eax, 0x12340000
jne 0x408e58
cmp dword [esp + 0x38], 0
mov dword [esp + 0x24], 0
jle 0x408e58
mov edx, dword [esp + 0x24]
xor eax, eax
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x50]
push edx
push eax
call sub.Files.dll_FILES_GetImageElement
add esp, 0xc
cmp eax, 0x12340000
jne 0x408e45
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0050bafb
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x44]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
push edx
push eax
push ecx
call sub.Files.dll_FILES_GetImageElement
add esp, 0x10
cmp eax, 0x12340000
jne 0x408e38
lea ecx, [esp + 0x30]
call fcn.00401d40
fild dword [esp + 0x24]
mov byte [esp + 0x200], 4
mov edx, dword [esp + 0x38]
fmul qword [0x565a28]
lea eax, [edx + edx - 1]
mov dword [esp + 0x5c], eax
fild dword [esp + 0x5c]
test eax, eax
jge 0x408dc6
fadd qword [0x565a20]
fdivp st(1)
call fcn.005113f0
mov ebx, eax
push ebx
lea ecx, [esp + 0x34]
push str.Download..._d__
push ecx
call fcn.004034d0
add esp, 0xc
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x24]
call fcn.004017d0
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x14]
push eax
push ebx
push 0x466
push ecx
call edi
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x40]
push 0
push edx
push eax
push ecx
call dword [sym.imp.STBLLIB.dll_STBL_DNLOAD]
add esp, 0x10
test al, al
jne 0x40900e
lea ecx, [esp + 0x30]
mov byte [esp + 0x200], 3
call fcn.00401fb0
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x48]
push edx
call fcn.0050ab22
add esp, 4
mov eax, dword [esp + 0x24]
inc eax
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
jl 0x408d31
cmp dword [esp + 0x38], 0
mov dword [esp + 0x24], 0
jle 0x408fa6
mov edx, dword [esp + 0x24]
xor eax, eax
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x50]
push edx
push eax
call sub.Files.dll_FILES_GetImageElement
add esp, 0xc
cmp eax, 0x12340000
jne 0x408f93
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0050bafb
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x44]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
push edx
push eax
push ecx
call sub.Files.dll_FILES_GetImageElement
add esp, 0x10
cmp eax, 0x12340000
jne 0x408f86
lea ecx, [esp + 0x30]
call fcn.00401d40
mov edx, dword [esp + 0x24]
mov byte [esp + 0x200], 5
mov eax, dword [esp + 0x38]
add edx, eax
mov dword [esp + 0x5c], edx
fild dword [esp + 0x5c]
test edx, edx
jge 0x408ef8
fadd qword [0x565a20]
fmul qword [0x565a28]
lea eax, [eax + eax - 1]
mov dword [esp + 0x5c], eax
fild dword [esp + 0x5c]
test eax, eax
jge 0x408f14
fadd qword [0x565a20]
fdivp st(1)
call fcn.005113f0
mov ebx, eax
push ebx
lea ecx, [esp + 0x34]
push str.Download..._d__
push ecx
call fcn.004034d0
add esp, 0xc
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x24]
call fcn.004017d0
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x14]
push eax
push ebx
push 0x466
push ecx
call edi
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x40]
push 0
push edx
push eax
push ecx
call dword [sym.imp.STBLLIB.dll_STBL_VERIFY]
add esp, 0x10
test al, al
jne 0x40905f
lea ecx, [esp + 0x30]
mov byte [esp + 0x200], 3
call fcn.00401fb0
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x48]
push edx
call fcn.0050ab22
add esp, 4
mov eax, dword [esp + 0x24]
inc eax
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
jl 0x408e6b
call dword [sym.imp.STBLLIB.dll_STBL_READOUT_PROTECT]
lea ecx, [esp + 0x1c]
test al, al
je 0x409082
push str.Fail_r_nTry_again__r_n
call fcn.00401bf0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 2
push ecx
push 0x465
push edx
call edi
call dword [sym.imp.STBLLIB.dll_STBL_READOUT_PROTECT]
lea ecx, [esp + 0x1c]
test al, al
je 0x409066
push str.Fail__r_n
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 3
push eax
push 0x465
push ecx
call edi
mov edx, dword [ebx + 0x10c]
push edx
jmp 0x40925e
push str.Fail_r_n
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 3
push eax
push 0x465
push ecx
call edi
mov edx, dword [esp + 0x48]
push edx
call fcn.0050ab22
mov esi, dword [esp + 0x30]
mov eax, dword [esi + 0x10c]
push eax
call fcn.0050ab22
push esi
call fcn.0050ab22
add esp, 0xc
lea ecx, [esp + 0x30]
call fcn.00401fb0
jmp 0x40926c
push str.Fail_n
jmp 0x409013
push str.Success__r_n
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 2
push eax
push 0x465
push ecx
jmp 0x40909c
push str.Success__r_n
call fcn.00401bf0
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
push 2
push edx
push 0x465
push eax
call edi
push str.Download...100_
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 0x14]
push ecx
push 0x64
push 0x466
push edx
call edi
push str.Finish_r_n
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
push 2
push eax
push 0x465
push ecx
call edi
mov edx, dword [ebx + 0x10c]
push edx
call fcn.0050ab22
push ebx
call fcn.0050ab22
add esp, 8
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [esp + 0x74]
sub ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x78]
sbb edx, dword [esp + 0x70]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
fild qword [esp + 0x5c]
fild qword [esp + 0x7c]
fdivp st(1)
fstp qword [esp + 0x5c]
call fcn.00416a2a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40913e
push 0x80004005
call fcn.00401ee0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
fld qword [esp + 0x5c]
sub esp, 8
mov byte [esp + 0x208], 6
fstp qword [esp]
lea ecx, [esp + 0x34]
push str.Time:__.1f_s_r_n
push ecx
call fcn.004034d0
add esp, 0x10
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x20]
call fcn.004017d0
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
push 2
push ebx
push 0x465
push eax
call edi
push 0x564e58
mov edi, 0x59e710
call fcn.0040b3d0
mov byte [esp + 0x204], 3
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4091cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x200], 2
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4091f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x200], 1
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40921c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x200], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409244
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x200], 0xffffffff
lea eax, [ebx - 0x10]
jmp 0x4092fe
mov ecx, dword [ebx + 0x10c]
push ecx
call fcn.0050ab22
push ebx
call fcn.0050ab22
add esp, 8
lea ecx, [esp + 0x50]
call fcn.00401fb0
lea ecx, [esp + 0x34]
call fcn.00401fb0
jmp 0x408a71
push str.Fail__r_n
lea ecx, [esp + 0x20]
call fcn.00401bf0
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
push 3
push edx
push 0x465
push eax
jmp 0x408a6f
push 0x1c
push str.Fail_r_n_Please_Power_again__r_n
lea ecx, [esp + 0x24]
call fcn.00401b00
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x14]
push 3
push ecx
push 0x465
push edx
call edi
lea eax, [ebx - 0x10]
mov byte [esp + 0x200], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4092ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x200], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409317
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0050a0dc
mov esp, ebp
pop ebp
ret