Function at 0x4a06c0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x52213c
xor edi, edi
mov dword [esp + 0x18], 0x800
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x14], ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x52216c]
cmp eax, ebp
jne 0x4a06ff
push 0x52213c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4a08b1
mov edx, dword [0x522170]
push ebp
lea ecx, [esp + 0x14]
push ecx
push ebp
push 0x20019
push ebp
push ebp
push ebp
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0x52213c
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, ebp
jne 0x4a08ea
mov ecx, dword [esp + 0x10]
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x2c]
push eax
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edi, eax
cmp edi, ebp
jne 0x4a08ea
mov edx, dword [esp + 0x14]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebp
jne 0x4a0779
mov edi, 0xe
jmp 0x4a08ea
cmp dword [esp + 0x1c], ebp
je 0x4a08b1
push ebp
lea eax, [esp + 0x24]
push eax
call fcn.0049f010
cmp dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
jbe 0x4a08b1
lea esp, [esp]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push ebp
push ebp
push ebp
push ebp
lea ecx, [esp + 0x24]
push ecx
push esi
push edx
push eax
mov dword [esp + 0x34], 0x7f6
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp edi, 0x103
je 0x4a08af
cmp edi, ebp
jne 0x4a08ea
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4a07e0
sub eax, edx
sar eax, 1
lea ecx, [esi + eax*2 - 6]
push 0x4f023c
push ecx
call fcn.00443da5
add esp, 8
test eax, eax
jne 0x4a0898
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4a0810
sub eax, edx
lea edx, [esp + 0x20]
push edx
sar eax, 1
push esi
mov word [esi + eax*2 - 6], bp
call fcn.004a0410
test eax, eax
jne 0x4a084f
cmp dword [0x522178], ebp
je 0x4a0898
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.NTVSDGetFromStorage
call dword [0x522178]
jmp 0x4a0898
mov eax, dword [0x522174]
cmp eax, ebp
je 0x4a088b
mov ecx, ebx
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 2
push ecx
push esi
lea edx, [esp + 0x28]
push edx
call eax
test eax, eax
jne 0x4a088b
cmp dword [0x522178], ebp
je 0x4a088b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityFunc
call dword [0x522178]
lea eax, [esp + 0x20]
push eax
call fcn.0049fcc0
add ebx, 1
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jb 0x4a07a0
jmp 0x4a08b1
xor edi, edi
mov eax, dword [0x522174]
cmp eax, ebp
je 0x4a08ea
neg ebx
sbb ebx, ebx
and ebx, 0xfffffffd
add ebx, 3
or ebx, 4
push ebx
push ebp
push ebp
call eax
test eax, eax
jne 0x4a08ea
cmp dword [0x522178], ebp
je 0x4a08ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityFunc
call dword [0x522178]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x4a08f9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebp
je 0x4a090c
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp edi, ebp
pop edi
pop esi
pop ebp
sete al
pop ebx
add esp, 0x38
ret