Function at 0x4018f0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x100
push ebx
push ebp
push esi
push edi
push 0
call sub.WCH55XISPDLL.DLL_WCH55x_IspRemoveProtect
test eax, eax
jne 0x40191f
push str.Fail_to_disable_read_code_protect.
call fcn.00401000
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret
push str.Succ_to_disable_read_code_protect.
call fcn.00401000
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 4
push 0x3e8
call esi
call fcn.004015e0
push 0x3e8
call esi
cmp word [0x4059d3], 0
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x401a2a
mov ecx, 0x3f
xor eax, eax
mov edi, 0x426304
push 0x4259b0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x426484
push 0x80000002
stosb byte es:[edi], al
call ebp
mov eax, dword [0x4259b0]
push 0x4259bc
push 0x426304
push 0x42599c
push 0
push 0x40522c
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [0x4259b0]
push ecx
call ebx
push 0x426304
call sub.MSVCRT.dll_atoi
xor edx, edx
add esp, 4
mov dx, word [0x4059d3]
mov dword [0x4259b8], eax
cmp eax, edx
jb 0x401a2a
push str.SoftError_0x81__
call fcn.00401000
mov eax, dword [0x4259ac]
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
add esp, 4
push 0
push 0x285a
push eax
call esi
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call edi
mov ecx, dword [0x4259ac]
push 0
push 0x3ec
push ecx
call esi
push eax
call edi
mov edx, dword [0x4259ac]
push 0
push 0x285a
push edx
call dword [sym.imp.USER32.dll_CheckDlgButton]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x100
ret
mov eax, dword [0x4259a0]
push 0x2000
push 0
push 0
push 0
push 0x70
push eax
call dword [sym.imp.USER32.dll_LoadImageA]
mov ecx, dword [0x4259ac]
push eax
push 0
push 0x172
push 0x2865
push ecx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov dword [0x4259c0], 1
call fcn.004014b0
test eax, eax
jne 0x401a7d
push str.Set_isp_option_failure.
call fcn.00401000
add esp, 4
mov eax, dword [esp + 0x114]
mov ecx, dword [0x405994]
cmp eax, ecx
jb 0x401aa9
push eax
push str.Invalid_device_index__d_
call fcn.00401000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret
lea esi, [eax + eax*8]
xor edx, edx
shl esi, 3
sub esi, eax
xor eax, eax
add esi, 0x4259c8
xor ecx, ecx
mov dl, byte [esi + 0x12]
mov al, byte [esi + 0x11]
mov cl, byte [esi + 0x10]
push edx
push eax
xor edx, edx
mov dl, byte [esi + 0xf]
push ecx
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 0xe]
mov cl, byte [esi + 0xd]
push edx
mov edx, dword [esi]
push eax
push ecx
push edx
push str._dISP_DEV:_02X__02X__02X__02X__02X__02X
push 0x426404
call sub.MSVCRT.dll_sprintf
push 0x426404
push str.__s__begin_download...
call fcn.00401000
mov eax, dword [0x4259ac]
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
add esp, 0x2c
push 0
push 0x3ef
push eax
call edi
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, dword [0x4259ac]
push 0
push 0x3ec
push ecx
call edi
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
mov eax, dword [0x4261f8]
mov edx, dword [0x4059e4]
push 0
inc eax
push 0
push 0
mov dword [0x4261f8], eax
mov eax, dword [esi]
push 1
push edx
push 0x4059e8
push eax
call sub.WCH55XISPDLL.DLL_WCH55x_FlashProgramB
test eax, eax
jne 0x401bae
push 0x426404
push str.__s__download_failure.
call fcn.00401000
mov ecx, dword [0x4259a0]
add esp, 8
push 0x2000
push 0
push 0
push 0
push 0x70
push ecx
call dword [sym.imp.USER32.dll_LoadImageA]
mov edx, dword [0x4259ac]
push eax
push 0
push 0x172
push 0x2865
push edx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
inc dword [0x426200]
jmp 0x401cd8
mov eax, dword [0x4261fc]
push 0x426404
inc eax
push str.__s__download_succ
mov dword [0x4261fc], eax
call fcn.00401000
mov eax, dword [0x4259a0]
add esp, 8
push 0x2000
push 0
push 0
push 0
push 0x71
push eax
call dword [sym.imp.USER32.dll_LoadImageA]
mov ecx, dword [0x4259ac]
push eax
push 0
push 0x172
push 0x2865
push ecx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
cmp word [0x4059d3], 0
je 0x401cd8
mov ecx, 0x3f
xor eax, eax
mov edi, 0x426304
push 0x4259b0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x426484
push 0x80000002
stosb byte es:[edi], al
call ebp
mov edx, dword [0x4259b0]
push 0x4259bc
push 0x426304
push 0x42599c
push 0
push 0x40522c
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [0x4259b0]
push eax
call ebx
push 0x426304
call sub.MSVCRT.dll_atoi
mov edx, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
inc edx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push 0xa
push ecx
push edx
stosw word es:[edi], ax
mov dword [0x4259b8], edx
call sub.MSVCRT.dll__itoa
add esp, 0x10
push 0x4259b0
push 0x426484
push 0x80000002
call ebp
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 1
push eax
mov eax, dword [0x4259b0]
push 0x40522c
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [0x4259b0]
push ecx
call ebx
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
mov edx, dword [0x4259ac]
push 1
push 0x3ef
push edx
call edi
mov esi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call esi
mov eax, dword [0x4259ac]
push 1
push 0x3ec
push eax
call edi
push eax
call esi
mov cl, byte [0x405988]
xor eax, eax
mov byte [esp + 0x10], cl
mov ecx, 0x1f
lea edi, [esp + 0x11]
mov edx, dword [0x426200]
rep stosd dword es:[edi], eax
mov ecx, dword [0x4261f8]
push edx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x4261fc]
lea edx, [esp + 0x14]
push eax
push ecx
push str.Dl_Cnt:_d_suc:_d__fal:_d
push edx
mov dword [0x4259c0], 0
call sub.MSVCRT.dll_sprintf
mov ecx, dword [0x4259ac]
add esp, 0x14
lea eax, [esp + 0x10]
push eax
push 0x285c
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea edx, [esp + 0x10]
push edx
push 0x405154
call fcn.00401000
mov eax, dword [0x4259ac]
add esp, 8
push 0
push 0
push 0xf5
push 0x3ef
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x100
ret