Function at 0x4020f8
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x407004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x50
xor ebx, ebx
lea eax, [ebp - 0x58]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x350], ebx
lea eax, [ebp - 0x350]
push eax
push 0x20019
push ebx
push 0x401128
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push 8
xor edi, edi
mov ebx, 0x407470
pop esi
inc edi
mov dword [ebp - 0x35c], esi
push edi
push 0x401214
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040192a
add esp, 0x10
mov dword [ebp - 0x34c], 0xa0
xor eax, eax
mov word [ebp - 0xf8], ax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0xf8]
push eax
push 0
push 0
lea eax, [ebp - 0x348]
push eax
push dword [ebp - 0x350]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ecx, word [ebp - 0xf8]
lea eax, [ebp - 0xf8]
push 0x20
pop edx
jmp 0x4021bf
add eax, 2
movzx ecx, word [eax]
cmp cx, dx
je 0x4021b9
xor edx, edx
cmp dx, cx
je 0x402279
push 0x7ffffffe
push eax
push ecx
push 0x50
pop esi
mov edx, esi
mov ecx, ebx
call fcn.004019dc
push edi
push 0x401228
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040192a
add esp, 0x10
mov dword [ebp - 0x34c], esi
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x58]
push eax
push 0
push 0
lea eax, [ebp - 0x348]
push eax
push dword [ebp - 0x350]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor eax, eax
cmp ax, word [ebp - 0x58]
jne 0x40223e
push 0x7ffffffe
push ebx
push ecx
push 0x28
pop edx
lea ecx, [ebp - 0x58]
call fcn.004019dc
mov ecx, dword [0x407cf8]
lea eax, [ebp - 0x58]
lea esi, [edi + 0xd5]
push eax
mov edx, esi
call fcn.00404e7d
lea edx, [ebp - 0x148]
lea ecx, [ebp - 0x58]
call fcn.0040577a
mov eax, edx
push eax
push esi
push dword [0x407cf8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
mov esi, dword [ebp - 0x35c]
inc edi
add ebx, 0xa0
sub esi, 1
mov dword [ebp - 0x35c], esi
jne 0x402155
xor esi, esi
push 0x14
inc esi
xor ebx, ebx
pop edi
push esi
push 0x401238
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040192a
add esp, 0x10
mov dword [ebp - 0x34c], 0xa0
xor eax, eax
mov word [ebp - 0xf8], ax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0xf8]
push eax
push ebx
push ebx
lea eax, [ebp - 0x348]
push eax
push dword [ebp - 0x350]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor eax, eax
cmp ax, word [ebp - 0xf8]
je 0x402310
lea eax, [ebp - 0xf8]
push eax
push ebx
push 0x143
push 0xc9
push dword [0x407cf8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
inc esi
sub edi, 1
jne 0x402297
push 0x64
pop esi
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x358], esi
push eax
lea eax, [ebp - 0x358]
mov dword [ebp - 0x354], esi
push eax
push ebx
push ebx
push 0x401258
push dword [ebp - 0x350]
mov dword [ebp - 0x34c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x358], ebx
jl 0x402391
push ebx
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, dword [ebp - 0x358]
add ecx, 0x32
cmp ecx, eax
jge 0x402391
cmp dword [ebp - 0x354], ebx
jl 0x402391
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov edx, dword [ebp - 0x354]
lea ecx, [edx + 0x32]
cmp ecx, eax
jge 0x402391
mov esi, dword [ebp - 0x358]
jmp 0x40239f
mov edx, esi
mov dword [ebp - 0x358], esi
mov dword [ebp - 0x354], edx
push 0x1d
push ebx
push ebx
push edx
push esi
push ebx
push dword [0x407cf8]
call dword [sym.imp.USER32.dll_SetWindowPos]
push dword [ebp - 0x350]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405b20
leave
ret