Function at 0x4217d0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c0
mov eax, dword [0x4713e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x81c], 0xffffffff
cmp dword [0x4677e8], 0
je 0x42180b
cmp dword [0x4677fc], 0
jne 0x42180b
mov dword [ebp - 0x864], 1
jmp 0x421815
mov dword [ebp - 0x864], 0
mov eax, dword [ebp - 0x864]
mov dword [ebp - 0x854], eax
mov dword [ebp - 0x830], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x808], ecx
cmp dword [ebp + 0x10], 2
jge 0x421841
xor eax, eax
jmp 0x42228c
mov edx, dword [ebp + 0x10]
sub edx, 1
mov dword [ebp - 0x80c], edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x80c]
mov byte [eax], 0
cmp dword [ebp + 8], 0
je 0x421869
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
test edx, edx
jne 0x421870
xor eax, eax
jmp 0x42228c
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax - 1]
mov dword [ebp - 0x82c], edx
mov eax, dword [ebp - 0x82c]
cmp eax, dword [ebp + 8]
jb 0x4218ba
mov ecx, dword [ebp - 0x82c]
movsx edx, byte [ecx]
cmp edx, 0x20
jge 0x4218ba
mov eax, dword [ebp - 0x82c]
mov byte [eax], 0
mov ecx, dword [ebp - 0x82c]
sub ecx, 1
mov dword [ebp - 0x82c], ecx
jmp 0x421887
mov edx, dword [ebp + 8]
push edx
push str.GETREG_Define__s_r_n
call fcn.004147f0
add esp, 8
push 0x3a
mov eax, dword [ebp + 8]
push eax
call fcn.00439480
add esp, 8
mov dword [ebp - 0x810], eax
cmp dword [ebp - 0x810], 0
je 0x422267
push 0x3a
mov ecx, dword [ebp - 0x810]
add ecx, 1
push ecx
call fcn.00439480
add esp, 8
mov dword [ebp - 0x820], eax
cmp dword [ebp - 0x820], 0
je 0x422267
push 0x3a
mov edx, dword [ebp - 0x820]
add edx, 1
push edx
call fcn.00439480
add esp, 8
mov dword [ebp - 0x818], eax
cmp dword [ebp - 0x818], 0
je 0x422267
mov eax, dword [ebp - 0x810]
mov byte [eax], 0
mov ecx, dword [ebp - 0x810]
add ecx, 1
mov dword [ebp - 0x810], ecx
mov edx, dword [ebp - 0x820]
mov byte [edx], 0
mov eax, dword [ebp - 0x820]
add eax, 1
mov dword [ebp - 0x820], eax
mov ecx, dword [ebp - 0x818]
mov byte [ecx], 0
mov edx, dword [ebp - 0x818]
add edx, 1
mov dword [ebp - 0x818], edx
lea eax, [ebp - 0x830]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00421290
add esp, 8
mov dword [ebp - 0x88c], eax
mov edx, dword [ebp - 0x810]
push edx
call fcn.00421190
add esp, 4
mov dword [ebp - 0x814], eax
mov eax, dword [ebp - 0x814]
mov dword [ebp - 0x8b0], eax
cmp dword [ebp - 0x830], 0
je 0x4219d3
mov ecx, dword [ebp - 0x830]
mov dword [ebp - 0x87c], ecx
jmp 0x4219fe
cmp dword [ebp - 0x854], 0
je 0x4219e8
mov dword [ebp - 0x8a0], 0x100
jmp 0x4219f2
mov dword [ebp - 0x8a0], 0
mov edx, dword [ebp - 0x8a0]
mov dword [ebp - 0x87c], edx
mov eax, dword [ebp - 0x87c]
mov dword [ebp - 0x830], eax
cmp dword [ebp - 0x814], 0
je 0x422267
cmp dword [ebp - 0x88c], 0
je 0x422267
mov dword [ebp - 0x81c], 0xffffffff
mov ecx, dword [ebp + 8]
push ecx
push str.GETREG_MainKey:___s_r_n
call fcn.004145f0
add esp, 8
mov edx, dword [ebp - 0x810]
push edx
push str.GETREG_Type:______s_r_n
call fcn.004145f0
add esp, 8
mov eax, dword [ebp - 0x820]
push eax
push str.GETREG_Key:_______s_r_n
call fcn.004145f0
add esp, 8
mov ecx, dword [ebp - 0x818]
push ecx
push str.GETREG_Index:_____s_r_n
call fcn.004145f0
add esp, 8
mov edx, dword [ebp - 0x854]
push edx
push str.GETREG_64bit:_____u_r_n
call fcn.004145f0
add esp, 8
lea eax, [ebp - 0x824]
push eax
mov ecx, dword [ebp - 0x830]
or ecx, 0x20019
push ecx
push 0
mov edx, dword [ebp - 0x820]
push edx
mov eax, dword [ebp - 0x88c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4221b0
push str.___key
mov ecx, dword [ebp - 0x818]
push ecx
call fcn.0043b330
add esp, 8
test eax, eax
jne 0x421c55
mov dword [ebp - 0x83c], 0
cmp dword [ebp - 0x83c], 0x40
jae 0x421c23
mov dword [ebp - 0x80c], 0x3fe
mov edx, 1
imul eax, edx, 0x3ff
mov dword [ebp - 0x85c], eax
cmp dword [ebp - 0x85c], 0x400
jae 0x421b1d
jmp 0x421b22
call fcn.0043920a
mov ecx, dword [ebp - 0x85c]
mov byte [ebp + ecx - 0x404], 0
mov edx, dword [ebp - 0x83c]
mov dword [ebp - 0x8a4], edx
mov eax, dword [ebp - 0x80c]
push eax
lea ecx, [ebp - 0x404]
push ecx
mov edx, dword [ebp - 0x8a4]
push edx
mov eax, dword [ebp - 0x824]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov dword [ebp - 0x8b8], eax
mov ecx, dword [ebp - 0x83c]
add ecx, 1
mov dword [ebp - 0x83c], ecx
cmp dword [ebp - 0x8b8], 0
je 0x421b81
jmp 0x421c23
mov edx, dword [ebp - 0x80c]
mov dword [ebp - 0x878], edx
cmp dword [ebp - 0x878], 0x400
jae 0x421b9b
jmp 0x421ba0
call fcn.0043920a
mov eax, dword [ebp - 0x878]
mov byte [ebp + eax - 0x404], 0
mov ecx, dword [ebp - 0x808]
cmp ecx, dword [ebp + 0xc]
jbe 0x421be8
push 0x46adf0
mov edx, dword [ebp - 0x808]
sub edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub eax, edx
push eax
mov ecx, dword [ebp - 0x808]
push ecx
call fcn.00418fd0
add esp, 0xc
add eax, dword [ebp - 0x808]
mov dword [ebp - 0x808], eax
lea edx, [ebp - 0x404]
push edx
push 0x46adf4
mov eax, dword [ebp - 0x808]
sub eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x808]
push edx
call fcn.00418fd0
add esp, 0x10
add eax, dword [ebp - 0x808]
mov dword [ebp - 0x808], eax
jmp 0x421ae7
mov eax, dword [ebp - 0x808]
cmp eax, dword [ebp + 0xc]
jbe 0x421c3a
mov dword [ebp - 0x84c], 0
jmp 0x421c44
mov dword [ebp - 0x84c], 0x6f
mov ecx, dword [ebp - 0x84c]
mov dword [ebp - 0x81c], ecx
jmp 0x4221a1
push str.___nam
mov edx, dword [ebp - 0x818]
push edx
call fcn.0043b330
add esp, 8
test eax, eax
jne 0x421c79
mov dword [ebp - 0x880], 1
jmp 0x421c83
mov dword [ebp - 0x880], 0
mov eax, dword [ebp - 0x880]
mov dword [ebp - 0x834], eax
cmp dword [ebp - 0x834], 0
jne 0x421cb4
push str.___val
mov ecx, dword [ebp - 0x818]
push ecx
call fcn.0043b330
add esp, 8
test eax, eax
jne 0x421f4d
mov dword [ebp - 0x838], 0
cmp dword [ebp - 0x838], 0x40
jae 0x421f1b
mov dword [ebp - 0x890], 0x3fe
mov edx, 1
imul eax, edx, 0x3ff
mov dword [ebp - 0x86c], eax
cmp dword [ebp - 0x86c], 0x400
jae 0x421cf4
jmp 0x421cf9
call fcn.0043920a
mov ecx, dword [ebp - 0x86c]
mov byte [ebp + ecx - 0x804], 0
mov dword [ebp - 0x80c], 0x3fe
mov edx, 1
imul eax, edx, 0x3ff
mov dword [ebp - 0x888], eax
cmp dword [ebp - 0x888], 0x400
jae 0x421d30
jmp 0x421d35
call fcn.0043920a
mov ecx, dword [ebp - 0x888]
mov byte [ebp + ecx - 0x404], 0
cmp dword [ebp - 0x834], 0
je 0x421d58
mov dword [ebp - 0x874], 0
jmp 0x421d64
lea edx, [ebp - 0x404]
mov dword [ebp - 0x874], edx
mov eax, dword [ebp - 0x838]
mov dword [ebp - 0x8c0], eax
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp - 0x874]
push edx
lea eax, [ebp - 0x814]
push eax
push 0
lea ecx, [ebp - 0x890]
push ecx
lea edx, [ebp - 0x804]
push edx
mov eax, dword [ebp - 0x8c0]
push eax
mov ecx, dword [ebp - 0x824]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov dword [ebp - 0x8ac], eax
mov edx, dword [ebp - 0x838]
add edx, 1
mov dword [ebp - 0x838], edx
cmp dword [ebp - 0x8ac], 0
je 0x421dcc
jmp 0x421f1b
mov eax, dword [ebp - 0x890]
mov dword [ebp - 0x898], eax
cmp dword [ebp - 0x898], 0x400
jae 0x421de6
jmp 0x421deb
call fcn.0043920a
mov ecx, dword [ebp - 0x898]
mov byte [ebp + ecx - 0x804], 0
cmp dword [ebp - 0x834], 0
jne 0x421e2f
mov edx, dword [ebp - 0x80c]
mov dword [ebp - 0x89c], edx
cmp dword [ebp - 0x89c], 0x400
jae 0x421e1c
jmp 0x421e21
call fcn.0043920a
mov eax, dword [ebp - 0x89c]
mov byte [ebp + eax - 0x404], 0
mov ecx, dword [ebp - 0x808]
cmp ecx, dword [ebp + 0xc]
jbe 0x421e69
push 0x46ae08
mov edx, dword [ebp - 0x808]
sub edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub eax, edx
push eax
mov ecx, dword [ebp - 0x808]
push ecx
call fcn.00418fd0
add esp, 0xc
add eax, dword [ebp - 0x808]
mov dword [ebp - 0x808], eax
cmp dword [ebp - 0x834], 0
je 0x421e7e
mov dword [ebp - 0x884], 0x474cae
jmp 0x421e88
mov dword [ebp - 0x884], 0x46ae0c
mov edx, dword [ebp - 0x884]
push edx
lea eax, [ebp - 0x804]
push eax
push 0x46ae10
mov ecx, dword [ebp - 0x808]
sub ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub edx, ecx
push edx
mov eax, dword [ebp - 0x808]
push eax
call fcn.00418fd0
add esp, 0x14
add eax, dword [ebp - 0x808]
mov dword [ebp - 0x808], eax
cmp dword [ebp - 0x834], 0
jne 0x421f0d
mov ecx, dword [ebp - 0x808]
sub ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub edx, ecx
push edx
mov eax, dword [ebp - 0x808]
push eax
mov ecx, dword [ebp - 0x80c]
push ecx
lea edx, [ebp - 0x404]
push edx
mov eax, dword [ebp - 0x814]
push eax
call fcn.004215d0
add esp, 0x14
add eax, dword [ebp - 0x808]
mov dword [ebp - 0x808], eax
mov ecx, dword [ebp - 0x808]
mov byte [ecx], 0
jmp 0x421cbe
mov edx, dword [ebp - 0x808]
cmp edx, dword [ebp + 0xc]
jbe 0x421f32
mov dword [ebp - 0x894], 0
jmp 0x421f3c
mov dword [ebp - 0x894], 0x6f
mov eax, dword [ebp - 0x894]
mov dword [ebp - 0x81c], eax
jmp 0x4221a1
cmp dword [ebp - 0x814], 1
je 0x421f68
cmp dword [ebp - 0x814], 7
je 0x421f68
cmp dword [ebp - 0x814], 2
jne 0x421f9b
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x814]
push eax
push 0
mov ecx, dword [ebp - 0x818]
push ecx
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x81c], eax
jmp 0x4221a1
cmp dword [ebp - 0x814], 4
jne 0x42201e
mov dword [ebp - 0x80c], 4
lea eax, [ebp - 0x80c]
push eax
lea ecx, [ebp - 0x8bc]
push ecx
lea edx, [ebp - 0x814]
push edx
push 0
mov eax, dword [ebp - 0x818]
push eax
mov ecx, dword [ebp - 0x824]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x81c], eax
cmp dword [ebp - 0x81c], 0
jne 0x421ff6
mov edx, dword [ebp - 0x8bc]
mov dword [ebp - 0x850], edx
jmp 0x422000
mov dword [ebp - 0x850], 0
mov eax, dword [ebp - 0x850]
push eax
push 0x46ae18
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4221a1
cmp dword [ebp - 0x814], 3
jne 0x4221a1
mov dword [ebp - 0x828], 0x200
mov edx, dword [ebp - 0x828]
add edx, 0x10
push edx
call fcn.0043982d
add esp, 4
mov dword [ebp - 0x848], eax
mov eax, dword [ebp - 0x828]
mov dword [ebp - 0x80c], eax
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp - 0x848]
push edx
lea eax, [ebp - 0x814]
push eax
push 0
mov ecx, dword [ebp - 0x818]
push ecx
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x81c], eax
mov eax, dword [ebp - 0x80c]
cmp eax, dword [ebp - 0x828]
jae 0x4220a6
mov ecx, dword [ebp - 0x80c]
mov dword [ebp - 0x858], ecx
jmp 0x4220b2
mov edx, dword [ebp - 0x828]
mov dword [ebp - 0x858], edx
mov eax, dword [ebp + 0x10]
shr eax, 1
sub eax, 1
cmp dword [ebp - 0x858], eax
jae 0x4220f8
mov ecx, dword [ebp - 0x80c]
cmp ecx, dword [ebp - 0x828]
jae 0x4220de
mov edx, dword [ebp - 0x80c]
mov dword [ebp - 0x860], edx
jmp 0x4220ea
mov eax, dword [ebp - 0x828]
mov dword [ebp - 0x860], eax
mov ecx, dword [ebp - 0x860]
mov dword [ebp - 0x868], ecx
jmp 0x422106
mov edx, dword [ebp + 0x10]
shr edx, 1
sub edx, 1
mov dword [ebp - 0x868], edx
mov eax, dword [ebp - 0x868]
mov dword [ebp - 0x80c], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x844], ecx
mov edx, dword [ebp - 0x848]
mov dword [ebp - 0x840], edx
mov eax, dword [ebp - 0x80c]
mov dword [ebp - 0x8b4], eax
mov ecx, dword [ebp - 0x80c]
sub ecx, 1
mov dword [ebp - 0x80c], ecx
cmp dword [ebp - 0x8b4], 0
je 0x422192
mov edx, dword [ebp - 0x840]
movzx eax, byte [edx]
mov dword [ebp - 0x8a8], eax
mov ecx, dword [ebp - 0x8a8]
push ecx
push str._02x
mov edx, dword [ebp - 0x844]
push edx
call fcn.00439aa0
add esp, 0xc
add eax, dword [ebp - 0x844]
mov dword [ebp - 0x844], eax
mov eax, dword [ebp - 0x840]
add eax, 1
mov dword [ebp - 0x840], eax
jmp 0x422127
mov ecx, dword [ebp - 0x848]
push ecx
call fcn.004397f5
add esp, 4
mov edx, dword [ebp - 0x824]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4221c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegOpenKeyEx_failed__d_r_n
call fcn.004145f0
add esp, 8
mov eax, dword [ebp - 0x8b0]
cmp eax, dword [ebp - 0x814]
jne 0x422237
cmp dword [ebp - 0x814], 7
jne 0x422237
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x810], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x810]
movsx edx, byte [ecx + eax]
test edx, edx
jne 0x422210
mov eax, 1
shl eax, 0
mov ecx, dword [ebp - 0x810]
movsx edx, byte [ecx + eax]
test edx, edx
je 0x422237
mov eax, dword [ebp - 0x810]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x422226
mov edx, dword [ebp - 0x810]
mov byte [edx], 0xa
mov eax, dword [ebp - 0x810]
add eax, 1
mov dword [ebp - 0x810], eax
jmp 0x4221e4
cmp dword [ebp - 0x81c], 0
jne 0x422253
mov ecx, dword [ebp + 0xc]
push ecx
push str.GETREG_Value_ok__s_r_n
call fcn.004145f0
add esp, 8
jmp 0x422267
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GETREG_Value_not_found__Error_d__r_n
call fcn.004145f0
add esp, 8
cmp dword [ebp - 0x81c], 0
jne 0x42227c
mov dword [ebp - 0x870], 1
jmp 0x422286
mov dword [ebp - 0x870], 0
mov eax, dword [ebp - 0x870]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439b24
mov esp, ebp
pop ebp
ret