Function at 0x521940
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59a718
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov ecx, dword [ebp + 0x18]
push ebx
push esi
push edi
push 0xffffffffffffffff
push 0
call fcn.00434050
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x521999
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 ebx, eax
mov eax, dword [ebp + 0xc]
neg ebx
sbb ebx, ebx
not ebx
and ebx, eax
jmp 0x52199c
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x521bb5
call fcn.0048b040
test eax, eax
je 0x521ab5
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x5219bd
mov dword [ebp + 0x10], eax
jmp 0x5219f0
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.00413cb0
mov ecx, dword [ebp + 0x10]
mov esi, esp
push edi
push esi
push 0xffffffffffffffff
push ecx
push 0
push 0
mov word [esi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp + 0x10], esi
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp + 0x14]
push 0
push eax
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x521ba9
mov eax, dword [ebp + 0x14]
cmp eax, 1
je 0x521a2a
cmp eax, 2
je 0x521a2a
cmp eax, 6
je 0x521a2a
cmp eax, 7
jne 0x521ba9
mov edx, dword [ebp + 0xc]
add edx, 2
push edx
call fcn.0057985d
mov esi, eax
mov eax, dword [ebp + 0xc]
mov edi, esi
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 esi
push 0
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x521ba0
cmp word [esi], ax
mov edi, esi
je 0x521a96
mov ecx, dword [ebp + 0x18]
push edi
mov edx, dword [ecx + 4]
push edx
call fcn.004345f0
push edi
call fcn.00414e6e
lea edi, [edi + eax*2 + 2]
add esp, 4
cmp word [edi], 0
jne 0x521a76
cmp ebx, dword [ebp + 8]
je 0x521aa2
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.00579886
add esp, 4
mov eax, 1
jmp 0x521bb7
mov edx, dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp + 0x14]
push 0
push ecx
push 0
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x521ba9
mov eax, dword [ebp + 0x14]
cmp eax, 1
je 0x521aef
cmp eax, 2
je 0x521aef
cmp eax, 6
je 0x521aef
cmp eax, 7
jne 0x521ba9
mov eax, dword [ebp + 0xc]
add eax, 2
push eax
call fcn.0057985d
mov ecx, dword [ebp + 0xc]
mov esi, eax
add ecx, 2
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [ebp - 0x10], esi
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
push esi
push 0
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x521ba0
mov edx, esi
cmp byte [edx], 0
je 0x521b81
push esi
lea ecx, [ebp + 0x10]
call fcn.0042c8f0
mov ecx, dword [ebp + 0x18]
lea edx, [ebp + 0x10]
push edx
mov dword [ebp - 4], 0
mov eax, dword [ecx + 4]
push eax
call fcn.004346e0
lea ecx, [ebp + 0x10]
mov dword [ebp - 4], 0xffffffff
call fcn.0042d270
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
jne 0x521b3a
cmp ebx, dword [ebp + 8]
je 0x521b8d
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x10]
push eax
call fcn.00579886
add esp, 4
mov eax, 1
jmp 0x521bb7
push esi
call fcn.00579886
add esp, 4
cmp ebx, dword [ebp + 8]
je 0x521bb5
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret