Function at 0x402038
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x406004]
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 0x401110
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push 8
xor edi, edi
mov ebx, 0x406470
pop esi
inc edi
mov dword [ebp - 0x35c], esi
push edi
push 0x4011fc
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040186b
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 0x4020ff
add eax, 2
movzx ecx, word [eax]
cmp cx, dx
je 0x4020f9
xor edx, edx
cmp dx, cx
je 0x4021b9
push 0x7ffffffe
push eax
push ecx
push 0x50
pop esi
mov edx, esi
mov ecx, ebx
call fcn.0040192c
push edi
push 0x401210
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040186b
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 0x40217e
push 0x7ffffffe
push ebx
push ecx
push 0x28
pop edx
lea ecx, [ebp - 0x58]
call fcn.0040192c
mov ecx, dword [0x406d00]
lea eax, [ebp - 0x58]
lea esi, [edi + 0xd5]
push eax
mov edx, esi
call fcn.00404d3c
lea edx, [ebp - 0x148]
lea ecx, [ebp - 0x58]
call fcn.004055cb
mov eax, edx
push eax
push esi
push dword [0x406d00]
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 0x402095
xor esi, esi
push 0x14
inc esi
xor ebx, ebx
pop edi
push esi
push 0x401220
lea eax, [ebp - 0x348]
push 0x200
push eax
call fcn.0040186b
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 0x402250
lea eax, [ebp - 0xf8]
push eax
push ebx
push 0x143
push 0xc9
push dword [0x406d00]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
inc esi
sub edi, 1
jne 0x4021d7
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 0x401240
push dword [ebp - 0x350]
mov dword [ebp - 0x34c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x358], ebx
jl 0x4022d1
push ebx
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, dword [ebp - 0x358]
add ecx, 0x32
cmp ecx, eax
jge 0x4022d1
cmp dword [ebp - 0x354], ebx
jl 0x4022d1
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov edx, dword [ebp - 0x354]
lea ecx, [edx + 0x32]
cmp ecx, eax
jge 0x4022d1
mov esi, dword [ebp - 0x358]
jmp 0x4022df
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 [0x406d00]
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.00405950
mov esp, ebp
pop ebp
ret