Function at 0x4228a2
Capabilities:
Query or enumerate registry key

Disassembly:
push 0x23c
mov eax, 0x4aa7d6
call fcn.004a95a1
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x4228dd
test byte [eax + 0x1c], 1
je 0x4228dd
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x10c
push dword [eax + 0x10]
call fcn.00416054
mov eax, dword [0x4b70c8]
xor ebx, ebx
inc ebx
xor esi, esi
mov ecx, esi
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x220], ecx
mov edx, esi
mov dword [ebp - 0x244], esi
mov dword [ebp - 0x240], esi
cmp eax, 0x4b70c8
je 0x42292d
test byte [eax + 0x1c], 2
je 0x42292d
cmp byte [eax + 0x19], 5
jb 0x42292d
push edx
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x10d
push dword [eax + 0x10]
call fcn.0041610f
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x42293e
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x248], esi
lea eax, [ebp - 0x218]
mov dword [ebp - 4], esi
push eax
push 0x20219
push esi
push 0x406678
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x218], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x422cce
mov edi, dword [ebp - 0x218]
lea eax, [ebp - 0x238]
push esi
push esi
push esi
push esi
push eax
lea eax, [ebp - 0x214]
mov dword [ebp - 0x248], edi
push eax
push dword [ebp - 0x224]
mov dword [ebp - 0x238], 0x100
push edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ecx, eax
cmp ecx, 0x103
je 0x422cc6
test ecx, ecx
jne 0x422c86
push 0x406678
lea ecx, [ebp - 0x21c]
call fcn.0041706d
lea ecx, [ebp - 0x214]
mov byte [ebp - 4], bl
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4229db
sub ecx, edx
lea eax, [ebp - 0x214]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00416cb5
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x22c], esi
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
push 0x20219
push esi
push dword [ebp - 0x21c]
mov dword [ebp - 0x218], esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x422bf1
mov ebx, dword [ebp - 0x218]
lea ecx, [ebp - 0x228]
push 0x4b8970
mov dword [ebp - 0x234], ebx
call fcn.00417475
lea eax, [ebp - 0x228]
mov byte [ebp - 4], 3
push eax
mov edx, 0x406654
lea ecx, [ebp - 0x234]
call fcn.00495d6d
mov ecx, eax
test ecx, ecx
je 0x422b06
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422aae
test byte [eax + 0x1c], 2
je 0x422aae
cmp byte [eax + 0x19], 5
jb 0x422aae
push ecx
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x111
push dword [eax + 0x10]
call fcn.0041610f
mov ecx, dword [ebp - 0x228]
lea ecx, [ecx - 0x10]
call fcn.004174b0
test ebx, ebx
je 0x422acd
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x234], esi
mov ecx, dword [ebp - 0x21c]
lea ecx, [ecx - 0x10]
call fcn.004174b0
test edi, edi
je 0x422ae6
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
inc ebx
mov edx, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x220]
inc edx
mov eax, dword [0x4b70c8]
mov dword [ebp - 0x224], edx
jmp 0x4228fe
mov dword [ebp - 0x23c], esi
mov esi, dword [ebp - 0x228]
push 0x4044b4
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x218], ecx
test eax, eax
je 0x422b8c
lea eax, [ebp - 0x220]
push eax
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x23c]
push eax
xor eax, eax
inc eax
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
mov edx, eax
test edx, edx
je 0x422b8c
xor ecx, ecx
inc ecx
mov dword [ebp - 0x218], ecx
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422bd0
test byte [eax + 0x1c], 2
je 0x422b97
cmp byte [eax + 0x19], 5
jb 0x422b97
push edx
push esi
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x112
push dword [eax + 0x10]
call fcn.00417794
mov ecx, dword [ebp - 0x218]
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422bc7
test byte [eax + 0x1c], 2
je 0x422bc7
cmp byte [eax + 0x19], 4
jb 0x422bc7
push ecx
lea ecx, [ebp - 0x214]
mov edx, 0x4066d8
push ecx
push dword [eax + 0x14]
mov ecx, 0x113
push dword [eax + 0x10]
call fcn.00417794
cmp dword [ebp - 0x218], 0
je 0x422c46
lea ecx, [esi - 0x10]
call fcn.004174b0
test ebx, ebx
je 0x422bea
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x422ac7
xor esi, esi
jmp 0x422acd
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422c24
test byte [eax + 0x1c], 2
je 0x422c24
cmp byte [eax + 0x19], 2
jb 0x422c24
push dword [ebp - 0x21c]
mov edx, 0x4066d8
mov ecx, 0x110
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00416072
mov ecx, dword [ebp - 0x21c]
lea ecx, [ecx - 0x10]
call fcn.004174b0
test edi, edi
je 0x422ae9
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x422ae9
xor eax, eax
lea ecx, [esi - 0x10]
inc eax
mov dword [ebp - 0x224], eax
call fcn.004174b0
test ebx, ebx
je 0x422c62
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x21c]
lea ecx, [ecx - 0x10]
call fcn.004174b0
test edi, edi
je 0x422c7b
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x224]
jmp 0x422d07
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422cb9
test byte [eax + 0x1c], 2
je 0x422cb9
cmp byte [eax + 0x19], 2
jb 0x422cb9
push ecx
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x10f
push dword [eax + 0x10]
call fcn.0041610f
mov eax, dword [0x4b70c8]
test edi, edi
je 0x422d0c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x422d07
mov ebx, esi
test edi, edi
je 0x422d07
jmp 0x422cbd
jle 0x422cd9
movzx ecx, cx
or ecx, 0x80070000
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422d0c
test byte [eax + 0x1c], 2
je 0x422d0c
cmp byte [eax + 0x19], 2
jb 0x422d0c
push ecx
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x10e
push dword [eax + 0x10]
call fcn.0041610f
mov eax, dword [0x4b70c8]
cmp dword [ebp - 0x220], 0
je 0x422d2d
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebp - 0x220], 0
mov eax, dword [0x4b70c8]
cmp eax, 0x4b70c8
je 0x422d56
test byte [eax + 0x1c], 1
je 0x422d56
cmp byte [eax + 0x19], 5
jb 0x422d56
push ebx
push dword [eax + 0x14]
mov edx, 0x4066d8
mov ecx, 0x114
push dword [eax + 0x10]
call fcn.0041610f
mov eax, ebx
call fcn.004a9550
ret