Function at 0x40c670
Capabilities:
Delete file
Read .ini file
Set console window title
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44870b
mov eax, dword fs:[0]
push eax
sub esp, 0x9b0
mov eax, dword [0x457a00]
xor eax, esp
mov dword [esp + 0x9a8], eax
push ebx
push esi
push edi
mov eax, dword [0x457a00]
xor eax, esp
push eax
lea eax, [esp + 0x9c0]
mov dword fs:[0], eax
push 0x44dbb0
call fcn.004301ca
add esp, 4
push str.Welcome_to_use_OnekeyUpdate_Tool._n
call fcn.004301ca
add esp, 4
push 0x1ff
xor ebx, ebx
lea eax, [esp + 0x5b9]
push ebx
push eax
mov byte [esp + 0x5c0], 0
call fcn.00433570
add esp, 0xc
lea edi, [esp + 0x5b4]
call fcn.00402760
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov edx, edi
push edx
push str.The_Software_to_be_updated:_s_n
call fcn.004301ca
push 0x45029b
call fcn.004301ca
add esp, 0xc
cmp byte [0x45bd5e], bl
jne 0x40c73e
cmp byte [0x45bd5f], bl
jne 0x40c73e
cmp byte [0x45c116], bl
jne 0x40c73e
push str.Press_Enter_to_update_or_Q_to_quit._n
call fcn.004301ca
add esp, 4
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push 0x402f30
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x7f
lea ecx, [esp + 0x21]
push ebx
push ecx
mov dword [0x45bc54], eax
mov byte [esp + 0x28], bl
call fcn.00433570
add esp, 0xc
push 0x45029b
lea ecx, [esp + 0x18]
call fcn.00415050
push 0x103
lea edx, [esp + 0x4b1]
push ebx
mov dword [esp + 0x9d0], ebx
push edx
mov byte [esp + 0x4b8], 0
call fcn.00433570
add esp, 0xc
push 0x103
lea eax, [esp + 0x1a1]
push ebx
push eax
mov byte [esp + 0x1a8], 0
call fcn.00433570
add esp, 0xc
push 0xff
lea ecx, [esp + 0xa1]
push ebx
push ecx
mov byte [esp + 0xa8], 0
call fcn.00433570
add esp, 0xc
lea esi, [esp + 0x4ac]
call fcn.00401520
mov edx, esi
push edx
push str._sCDSwitch.ini
lea eax, [esp + 0x1a4]
push 0x104
push eax
call fcn.00430bb0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x10
lea ecx, [esp + 0x19c]
push ecx
push 0x40
push 0x45c010
push 0x45029b
push str.CDID
push str.CDSwitch
call esi
cmp byte [0x45c010], 0
mov dword [0x45c00c], 0x44ca28
je 0x40c846
mov dword [0x45c00c], 0x45c010
lea edx, [esp + 0x19c]
push edx
push 0x40
lea eax, [esp + 0xa4]
push eax
push str.false
push str.lsDownloadbackup
push str.UPDATE
mov byte [0x45bf06], 0
call esi
lea eax, [esp + 0x9c]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c880
sub eax, edx
push eax
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00415440
lea edi, [esp + 0x14]
call fcn.00413db0
mov edx, dword [esp + 0x14]
push str.TRUE
push edx
call fcn.004319fa
add esp, 8
cmp eax, ebx
sete al
test al, al
je 0x40c8c8
mov byte [0x45bf06], 1
lea eax, [esp + 0x19c]
push eax
push 0x40
lea ecx, [esp + 0xa4]
push ecx
push str.false
push str.lsNewNVMechanism
push str.UPDATE
mov byte [0x45c117], 0
call esi
lea eax, [esp + 0x9c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c900
sub eax, edx
push eax
lea edx, [esp + 0xa0]
push edx
lea ecx, [esp + 0x1c]
call fcn.00415440
lea edi, [esp + 0x14]
call fcn.00413db0
mov eax, dword [esp + 0x14]
push str.TRUE
push eax
call fcn.004319fa
add esp, 8
cmp eax, ebx
sete al
test al, al
je 0x40c948
mov byte [0x45c117], 1
lea ecx, [esp + 0x19c]
push ecx
push 0x40
lea edx, [esp + 0xa4]
push edx
push str.false
push str.lsSupportFota
push str.UPDATE
mov byte [0x45c118], 0
call esi
lea eax, [esp + 0x9c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c980
sub eax, edx
push eax
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0x1c]
call fcn.00415440
lea edi, [esp + 0x14]
call fcn.00413db0
mov ecx, dword [esp + 0x14]
push str.TRUE
push ecx
call fcn.004319fa
add esp, 8
cmp eax, ebx
sete al
test al, al
je 0x40c9c8
mov byte [0x45c118], 1
cmp byte [0x45bd5c], 0
je 0x40cc10
push 0x206
lea edx, [esp + 0x2aa]
push ebx
push edx
mov word [esp + 0x2b0], bx
call fcn.00433570
add esp, 0xc
push 0x104
lea eax, [esp + 0x2a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x2a4]
push 0x5c
push ecx
call fcn.00430b05
mov edx, eax
lea ecx, [esp + 0x2ac]
sub edx, ecx
sar edx, 1
mov ecx, 0x104
sub ecx, edx
add ecx, ecx
push ecx
push ebx
push eax
call fcn.00433570
lea edi, [esp + 0x2b8]
add esp, 0x14
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40ca41
lea edx, [esp + 0x2a4]
mov eax, edx
push eax
push 0x44ec90
mov ecx, 7
mov esi, str.progress.ini
push 0x44eb78
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.Progress
mov dword [0x45bd60], edx
call esi
mov ecx, dword [0x45bd60]
push ecx
push 0x44ec90
push str.total
push str.Progress
call esi
call fcn.00408ab0
mov edx, dword [0x45bd60]
push edx
mov bl, al
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test bl, bl
jne 0x40cbb5
push 0x1fe
lea eax, [esp + 0x7ba]
push 0
push eax
mov word [esp + 0x7c0], 0
call fcn.00433570
add esp, 0xc
lea ecx, [esp + 0x2a4]
push 0x5c
push ecx
call fcn.00430b05
mov edx, eax
lea ecx, [esp + 0x2ac]
sub edx, ecx
sar edx, 1
mov ecx, 0x104
sub ecx, edx
add ecx, ecx
push ecx
push 0
push eax
call fcn.00433570
lea eax, [esp + 0x2b8]
add esp, 0x14
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40cb10
mov edx, dword [0x44ec94]
mov ecx, dword [str.tatus.ini]
mov dword [eax], edx
mov edx, dword [0x44ec9c]
mov dword [eax + 4], ecx
mov ecx, dword [0x44eca0]
mov dword [eax + 8], edx
mov edx, dword [0x44eca4]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x44eca8]
mov dword [eax + 0x10], edx
lea edx, [esp + 0x2a4]
push edx
push 0x44ecac
push str.result
push str.Status
mov dword [eax + 0x14], ecx
call esi
mov edx, dword [0x45bd64]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40cb75
push 0x100
lea ecx, [esp + 0x7b8]
push ecx
sub eax, edi
push eax
push edx
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esp + 0x2a4]
push edx
lea eax, [esp + 0x7b8]
push eax
push str.info
push str.Status
call esi
mov dword [esp + 0x9c8], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40cbe0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x9c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0042fb8f
mov esp, ebp
pop ebp
ret
call fcn.004301ca
add esp, 4
lea esp, [esp]
cmp byte [0x45bd5e], 0
jne 0x40cc3d
cmp byte [0x45bd5f], 0
jne 0x40cc3d
cmp byte [0x45c116], 0
jne 0x40cc3d
lea ecx, [esp + 0x1c]
push 0x80
push ecx
call fcn.0043102e
add esp, 8
cmp byte [esp + 0x1c], 0
je 0x40cc7b
mov edi, 0x44ece4
lea esi, [esp + 0x1c]
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40ceb6
mov edi, 0x44ece8
lea esi, [esp + 0x1c]
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40ceb6
push str.Invalid_input._n
jmp 0x40cc04
push 0x44dbb0
call fcn.004301ca
add esp, 4
call fcn.00408ab0
mov bl, al
test bl, bl
je 0x40cdab
add dword [0x45be7c], 1
push 0x44ecfc
call fcn.004301ca
add esp, 4
push str.______________________n
call fcn.004301ca
add esp, 4
push str.____________________n
call fcn.004301ca
add esp, 4
push str._____________n
call fcn.004301ca
add esp, 4
push 0x44ed98
call fcn.004301ca
add esp, 4
push str.________________________n
call fcn.004301ca
add esp, 4
push str.___________________n_n
call fcn.004301ca
mov ecx, dword [0x45be7c]
mov edx, dword [0x45bf00]
add esp, 4
push str.Success_to_update._n
push ecx
push edx
push str._n_FAIL:_d_PASS:_d___s
call fcn.004301ca
push str._____________________________OneKeyDownload__end______________________________n
call fcn.00401000
add esp, 0x14
push str.______________________________________________________________________________n
call fcn.00401000
add esp, 4
cmp byte [0x45bd5e], 0
jne 0x40cd46
cmp byte [0x45bd5f], 0
je 0x40ce65
push 0
push str.fail
call fcn.0043ccd1
add esp, 8
test eax, eax
jne 0x40ce65
push 0x44c6fc
push str.fail
xor edi, edi
call fcn.0042ff87
mov esi, eax
add esp, 8
test esi, esi
je 0x40cd94
push esi
call fcn.00431cb3
add esp, 4
push eax
call fcn.00431aa8
add esp, 4
push esi
mov edi, eax
call fcn.0043014e
add esp, 4
test edi, edi
setne al
test al, al
je 0x40ce65
push str.del__f__q_fail
jmp 0x40ce5d
add dword [0x45bf00], 1
push str._n______________n
call fcn.004301ca
add esp, 4
push 0x44ef5c
call fcn.004301ca
add esp, 4
push 0x44ef80
call fcn.004301ca
add esp, 4
push str._________________n
call fcn.004301ca
add esp, 4
push str.__________________n
call fcn.004301ca
add esp, 4
push str._______________________n
call fcn.004301ca
add esp, 4
push str.___________________n_n
call fcn.004301ca
add esp, 4
push str._____________________________OneKeyDownload__end______________________________n
call fcn.00401000
add esp, 4
push str.______________________________________________________________________________n
call fcn.00401000
mov eax, dword [0x45be7c]
mov ecx, dword [0x45bf00]
add esp, 4
push str.Fail_to_update._n
push eax
push ecx
push str._n_FAIL:_d_PASS:_d___s
call fcn.004301ca
add esp, 0x10
cmp byte [0x45bd5e], 0
jne 0x40ce58
cmp byte [0x45bd5f], 0
je 0x40ce65
push str.echo_fail_to_download___fail
call fcn.00431549
add esp, 4
cmp byte [0x45c116], 0
je 0x40ce7b
push str.pause
call fcn.00431549
add esp, 4
cmp byte [0x45bd5e], 0
jne 0x40ce96
cmp byte [0x45bd5f], 0
jne 0x40ce96
cmp byte [0x45c116], 0
je 0x40cea8
test bl, bl
jne 0x40cbb5
push str._n_Re_plug_in_the_dongle_and_Press_Enter_to_try_again_or_Q_to_quit._n
jmp 0x40cc04
test bl, bl
je 0x40ce9e
push str._n_Plug_in_another_dongle_and_Press_Enter_to_download_next_one_or_Q_to_quit._n
jmp 0x40cc04
push 0
call fcn.00431368
int3