Function at 0x4224e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x18], 0xffffffff
cmp dword [0x4677e8], 0
je 0x42250f
cmp dword [0x4677fc], 0
jne 0x42250f
mov dword [ebp - 0x24], 1
jmp 0x422516
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x14], 0
cmp dword [ebp + 0xc], 0
je 0x422533
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
test edx, edx
jne 0x42253a
xor eax, eax
jmp 0x42282b
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + eax - 1]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jb 0x422572
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x20
jge 0x422572
mov eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x42254e
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax - 1]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jb 0x4225aa
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x20
jge 0x4225aa
mov eax, dword [ebp - 4]
mov byte [eax], 0
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x422586
mov edx, dword [ebp + 0xc]
push edx
push str.SETREG_Define__s_r_n
call fcn.004147f0
add esp, 8
push 0x3a
mov eax, dword [ebp + 0xc]
push eax
call fcn.00439480
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x422812
push 0x3a
mov ecx, dword [ebp - 8]
add ecx, 1
push ecx
call fcn.00439480
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x422812
push 0x3a
mov edx, dword [ebp - 0xc]
add edx, 1
push edx
call fcn.00439480
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x422812
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x422812
mov ecx, dword [ebp - 8]
mov byte [ecx], 0
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x10]
mov byte [edx], 0
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00421290
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x14], 0
je 0x422670
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
jmp 0x42268c
cmp dword [ebp - 0x30], 0
je 0x42267f
mov dword [ebp - 0x28], 0x100
jmp 0x422686
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 8]
push eax
call fcn.00421190
add esp, 4
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00414dc0
add esp, 4
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x38], 0
je 0x422812
cmp dword [ebp - 0x34], 0
je 0x422812
mov dword [ebp - 0x18], 0xffffffff
mov edx, dword [ebp + 0xc]
push edx
push str.SETREG_MainKey:___s_r_n
call fcn.004145f0
add esp, 8
mov eax, dword [ebp - 8]
push eax
push str.SETREG_Type:______s_r_n
call fcn.004145f0
add esp, 8
mov ecx, dword [ebp - 0xc]
push ecx
push str.SETREG_Key:_______s_r_n
call fcn.004145f0
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
push str.SETREG_Index:_____s_r_n
call fcn.004145f0
add esp, 8
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
push str.SETREG_Value:_____8x__s_r_n
call fcn.004145f0
add esp, 0xc
mov edx, dword [ebp - 0x30]
push edx
push str.SETREG_64bit:_____u_r_n
call fcn.004145f0
add esp, 8
push 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, dword [ebp - 0x14]
or ecx, 0xf003f
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4227c3
cmp dword [ebp + 8], 0
je 0x422783
lea ecx, [ebp - 0x4c]
push ecx
push 0
lea edx, [ebp - 0x50]
push edx
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4227a7
mov dword [ebp - 0x3c], 1
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004222a0
add esp, 0x10
mov dword [ebp - 0x18], eax
jmp 0x4227ae
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4227d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegCreateKeyEx_failed__d_r_n
call fcn.004145f0
add esp, 8
cmp dword [ebp - 0x18], 0
jne 0x422801
cmp dword [ebp - 0x3c], 0
je 0x4227f2
push 0x46a1c8
call fcn.004145f0
add esp, 4
jmp 0x4227ff
push str.SETREG_Value_not_overwritten_r_n
call fcn.004145f0
add esp, 4
jmp 0x422812
mov ecx, dword [ebp - 0x48]
push ecx
push 0x46a1fc
call fcn.004145f0
add esp, 8
cmp dword [ebp - 0x18], 0
jne 0x422821
mov dword [ebp - 0x40], 1
jmp 0x422828
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x40]
mov esp, ebp
pop ebp
ret