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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x532f88
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x587770]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
mov edi, edx
call fcn.00416a2a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40797a
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 + 0x20], eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x84], 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0xc
push str.Config......
lea ecx, [esp + 0x28]
call fcn.00401b00
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 2
push eax
push 0x465
push ecx
call ebx
mov edx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
push edx
push esi
call fcn.00406290
lea ecx, [esp + 0x20]
test eax, eax
je 0x407a44
push 7
push str.Fail__r_n
call fcn.00401b00
mov esi, dword [esp + 0x20]
mov eax, dword [edi + 0x14]
push 3
push esi
push 0x465
push eax
call ebx
lea eax, [esi - 0x10]
mov dword [esp + 0x80], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407db9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xa
push str.Success__r_n
call fcn.00401b00
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 2
push ecx
push 0x465
push edx
call ebx
call fcn.004037d0
push 0xd
push str.Connect......
lea ecx, [esp + 0x28]
call fcn.00401b00
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 2
push eax
push 0x465
push ecx
call ebx
cmp dword [esi], 0
je 0x407abc
mov eax, dword [0x5893c4]
cmp eax, 0xffffffff
je 0x407ab1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov dword [0x5893c4], 0xffffffff
mov ecx, dword [esi]
call fcn.0040acb0
test eax, eax
je 0x407ae1
push 0x1d
push str.Fail__please_check_connect__r_n
lea ecx, [esp + 0x28]
call fcn.00401b00
mov esi, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 3
push esi
push 0x465
push edx
jmp 0x407a04
mov ecx, dword [edi + 0x24]
push ecx
mov ebx, esi
call fcn.00403960
xor ebx, ebx
cmp eax, ebx
je 0x407b1b
push str.Fail_r_n_Please_Power_again__r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov esi, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 3
push esi
push 0x465
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x407a06
push esi
call fcn.00403d30
cmp eax, ebx
je 0x407b69
push str.Fail__r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov esi, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 3
push esi
push 0x465
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [esi - 0x10]
mov dword [esp + 0x80], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x407a21
push esi
call fcn.00403cb0
test eax, eax
je 0x407b9c
push str.Fail__r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 3
push ecx
push 0x465
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x407db0
mov ecx, esi
call fcn.00404090
test eax, eax
je 0x407bd0
push str.Fail__r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 3
push eax
push 0x465
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x407db0
lea edx, [esp + 0x28]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
push edx
lea ebx, [esp + 0x28]
mov ecx, esi
call fcn.00403db0
test eax, eax
jne 0x407ba7
mov edx, dword [edi + 0x28]
lea ecx, [esp + 0x20]
cmp edx, dword [esp + 0x24]
je 0x407c1e
push str.Chose_wrong_chip__Fail__r_n
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 3
push eax
push 0x465
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x407db0
push str.Success__r_n
call fcn.00401bf0
mov edx, dword [esp + 0x20]
mov eax, dword [edi + 0x14]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push 2
push edx
push 0x465
push eax
call ebx
push str.Erase......
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 2
push ecx
push 0x465
push edx
call ebx
mov eax, esi
call fcn.004041b0
test eax, eax
je 0x407c90
push str.Fail__r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 3
push eax
push 0x465
push ecx
call ebx
jmp 0x407db0
mov eax, esi
call fcn.004045c0
lea ecx, [esp + 0x20]
test eax, eax
je 0x407cc0
push str.Fail__r_n
call fcn.00401bf0
mov edx, dword [esp + 0x20]
mov eax, dword [edi + 0x14]
push 3
push edx
push 0x465
push eax
call ebx
jmp 0x407db0
push str.Success__r_n
call fcn.00401bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 2
push ecx
push 0x465
push edx
call ebx
push str.Download......
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 2
push eax
push 0x465
push ecx
call ebx
mov ecx, esi
call fcn.00404930
lea ecx, [esp + 0x20]
test eax, eax
jne 0x407c9f
push str.Success__r_n
call fcn.00401bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 0x14]
push 2
push ecx
push 0x465
push edx
call ebx
push str.Finish_r_n
lea ecx, [esp + 0x24]
call fcn.00401bf0
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x14]
push 2
push eax
push 0x465
push ecx
call ebx
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
sbb ecx, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
fild qword [esp + 0x24]
fild qword [esp + 0x3c]
sub esp, 8
lea edx, [esp + 0x28]
fdivp st(1)
fstp qword [esp]
push str.Time:__.1f_s_r_n
push edx
call fcn.004034d0
mov eax, dword [esp + 0x30]
mov ecx, dword [edi + 0x14]
add esp, 0x10
push 2
push eax
push 0x465
push ecx
call ebx
push 0x564e58
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00401fb0
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret