Function at 0x12f57620
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
test eax, eax
je 0x12f57657
mov edx, dword [ebp + 0x14]
lea ecx, [ebp + 0xc]
or edx, 0x20019
push ecx
push edx
push 0
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
mov eax, dword [ebp + 0xc]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x12f5765a
mov esi, dword [ebp + 8]
test esi, esi
je 0x12f57813
call fcn.12f9c5b0
test eax, eax
je 0x12f5774c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x12f576af
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.12f5d910
mov ebx, esp
test ebx, ebx
je 0x12f576af
mov ecx, dword [ebp + 0x10]
push edi
push ebx
push 0xffffffffffffffff
push ecx
push 0
push 0
mov word [ebx], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp + 0x10], ebx
jmp 0x12f576b6
mov dword [ebp + 0x10], 0
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp + 0x14]
push 0
push eax
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x12f57807
mov eax, dword [ebp + 0x14]
cmp eax, 1
je 0x12f576f0
cmp eax, 2
je 0x12f576f0
cmp eax, 6
je 0x12f576f0
cmp eax, 7
jne 0x12f57807
mov edx, dword [ebp + 0xc]
add edx, 2
push edx
call fcn.12f5c05b
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov edi, ebx
add esp, 4
lea ecx, [eax + 2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
push ebx
push 0
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
push ebx
jne 0x12f577f2
mov ecx, dword [ebp + 0x18]
call fcn.12f47570
cmp esi, dword [ebp + 8]
je 0x12f577dc
jmp 0x12f577d5
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp + 0x14]
push 0
push eax
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x12f57807
mov eax, dword [ebp + 0x14]
cmp eax, 1
je 0x12f57786
cmp eax, 2
je 0x12f57786
cmp eax, 6
je 0x12f57786
cmp eax, 7
jne 0x12f57807
mov edx, dword [ebp + 0xc]
add edx, 2
push edx
call fcn.12f5c05b
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov edi, ebx
add esp, 4
lea ecx, [eax + 2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
push ebx
push 0
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
push ebx
jne 0x12f577f2
mov ecx, dword [ebp + 0x18]
call fcn.12f47650
cmp esi, dword [ebp + 8]
je 0x12f577dc
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call fcn.12f5c050
add esp, 4
mov eax, 1
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
call fcn.12f5c050
mov ecx, dword [ebp + 0x18]
add esp, 4
push 0x13198dc0
call fcn.12f47650
cmp esi, dword [ebp + 8]
je 0x12f57813
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esp, [ebp - 0xc]
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret