Function at 0x485fc0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x40
cmp dword [0x51e6dc], 0
push ebx
push ebp
mov ebx, eax
mov eax, dword [0x5165ec]
mov ebp, dword [eax + 0xd0]
push esi
push edi
mov edi, ecx
mov esi, edx
mov dword [esp + 0x20], ebp
je 0x486018
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x51e6dc]
test eax, eax
je 0x486013
cmp dword [esp + 0x24], 0
je 0x486013
mov eax, dword [0x5165ec]
mov dword [eax + 0xd0], 0x200
jmp 0x486018
mov eax, dword [0x5165ec]
xor cl, cl
mov byte [esp + 0x12], cl
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], cl
test edi, edi
je 0x4862b6
test ebx, ebx
je 0x4862b6
lea ecx, [esp + 0x13]
push ecx
push 0
push 2
push edi
call fcn.0041b5a0
add esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
je 0x48625b
mov ecx, dword [0x5165ec]
lea edx, [esp + 0x18]
push edx
mov edx, dword [ecx + 0xd0]
or edx, 0x20019
push edx
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x48625b
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push eax
lea eax, [esp + 0x24]
push eax
push 0
push ebx
push ecx
call ebp
test eax, eax
jne 0x48625b
mov eax, dword [esp + 0x1c]
dec eax
cmp eax, 6
ja case.0x4860b3.5
jmp dword [eax*4 + 0x4862c8]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 4
call ebp
test eax, eax
jne case.0x4860b3.5
mov edx, dword [esp + 0x28]
push eax
push edx
mov eax, esi
call fcn.004142e0
test eax, eax
je 0x48625b
jmp case.0x4860b3.5
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 0
call ebp
test eax, eax
jne case.0x4860b3.5
mov eax, dword [esp + 0x14]
test eax, eax
je case.0x4860b3.5
shr eax, 1
lea edi, [eax + 2]
call fcn.00414050
test eax, eax
je 0x48625b
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
push esi
push 0
push 0
push ebx
push eax
call ebp
test eax, eax
jne 0x48618e
mov eax, dword [esp + 0x14]
test eax, eax
je 0x48618e
shr eax, 1
xor ecx, ecx
mov dword [esi + eax*2], ecx
cmp dword [esp + 0x1c], 7
jne case.0x4860b3.5
mov eax, esi
cmp word [eax], 0
jne 0x486189
cmp word [eax + 2], 0
mov ecx, 0xa
mov word [eax], cx
je case.0x4860b3.5
add eax, 2
jmp 0x486170
xor edx, edx
mov word [esi], dx
jmp case.0x4860b3.5
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 0
call ebp
test eax, eax
jne case.0x4860b3.5
mov eax, dword [esp + 0x14]
test eax, eax
je case.0x4860b3.5
lea edi, [eax + eax]
call fcn.00414050
test eax, eax
je 0x48625b
mov ebp, dword [esi + 4]
mov ecx, dword [esp + 0x54]
xor edx, edx
mov word [ebp], dx
mov eax, dword [esp + 0x14]
lea ebx, [ebp + eax*2]
add ebx, eax
lea eax, [esp + 0x14]
push eax
push ebx
push edx
push edx
mov edx, dword [esp + 0x28]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne case.0x4860b3.5
mov ecx, 8
mov esi, 0x50d130
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
xor edx, edx
movsw word es:[edi], word [esi]
cmp dword [esp + 0x14], ecx
jbe 0x48624f
movzx eax, byte [ecx + ebx]
mov esi, eax
shr eax, 4
and esi, 0xf
mov si, word [esp + esi*2 + 0x2c]
and eax, 0xf
mov ax, word [esp + eax*2 + 0x2c]
mov word [ebp + edx*2 + 2], si
mov word [ebp + edx*2], ax
inc ecx
add edx, 2
cmp ecx, dword [esp + 0x14]
jb 0x486222
xor ecx, ecx
mov word [ebp + edx*2], cx
mov byte [esp + 0x12], 1
cmp byte [esp + 0x13], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x486273
mov eax, dword [esp + 0x24]
test eax, eax
je 0x486273
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x48629a
push eax
call esi
mov eax, dword [esp + 0x20]
mov edx, dword [0x5165ec]
pop edi
pop esi
pop ebp
mov dword [edx + 0xd0], eax
mov al, byte [esp + 6]
pop ebx
add esp, 0x40
ret
mov ecx, dword [0x5165ec]
mov edx, dword [esp + 0x20]
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
mov dword [ecx + 0xd0], edx
pop ebx
add esp, 0x40
ret
pop edi
pop esi
mov dword [eax + 0xd0], ebp
pop ebp
mov al, cl
pop ebx
add esp, 0x40
ret