Function at 0x404863
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ecx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
mov dword [ebp - 0x24], edi
push eax
mov dword [esi], edi
push 0x20019
mov dword [ecx], edi
push edi
mov dword [ebp - 4], edi
push str.SoftwareMicrosoftCryptographyDefaultsProvider
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404a8b
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x34]
push eax
lea edx, [ebp - 0x38]
push ecx
lea eax, [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x40]
push eax
lea edx, [ebp - 0x44]
push ecx
lea eax, [ebp - 0x48]
push edx
lea ecx, [ebp - 0x28]
push eax
lea edx, [ebp - 0x30]
push ecx
lea eax, [ebp - 0x258]
mov dword [ebp - 0x30], 0x104
push edi
push edx
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x404917
cmp dword [ebp - 0x28], edi
jbe 0x40491e
mov eax, dword [ebp - 0x28]
mov ebx, eax
mov dword [ebp - 0x24], eax
imul ebx, ebx, 0x20c
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [esi], eax
test eax, eax
je 0x404910
push ebx
push edi
push eax
call sub.MSVCRT40.dll_memset
add esp, 0xc
jmp 0x40491e
mov edi, 0x8007000e
jmp 0x40491e
call fcn.00404ae2
mov edi, eax
xor ebx, ebx
test edi, edi
jne 0x404a80
cmp dword [ebp - 0x24], ebx
je 0x404a80
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x2c], ebx
push 0x104
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x18]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x404963
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x24]
mov eax, 1
jb 0x404965
xor eax, eax
test eax, eax
je 0x404a80
mov eax, dword [ebp - 0x2c]
push 0x104
add eax, dword [esi]
lea ecx, [ebp - 0x154]
push ecx
mov dword [ebp - 0x10], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [ebp - 0x10]
push 0x104
add eax, 0x104
lea ecx, [ebp - 0x154]
push ecx
mov dword [ebp - 0x14], eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x154]
push ecx
push 0x20019
push 0
push edx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404a61
lea eax, [ebp - 0x20]
lea edx, [ebp - 0xc]
mov dword [ebp - 0x20], 0x104
push eax
push dword [ebp - 0x14]
push edx
push 0
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a10
cmp dword [ebp - 0xc], 1
jne 0x4049ff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jg 0x404a10
push 0x104
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x20], 4
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x208
push eax
push ecx
push 0
push str.Type
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a4f
cmp dword [ebp - 0xc], 4
je 0x404a56
cmp dword [ebp - 0xc], 3
je 0x404a56
mov edi, 0x80040153
jmp 0x404a56
call fcn.00404ae2
mov edi, eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404a68
call fcn.00404ae2
mov edi, eax
test edi, edi
jne 0x404a76
add dword [ebp - 0x2c], 0x20c
inc dword [ebp - 4]
xor edi, edi
inc dword [ebp - 0x18]
jmp 0x40493a
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404a92
call fcn.00404ae2
mov edi, eax
test edi, edi
jne 0x404ab4
cmp dword [ebp - 4], 0
je 0x404ab4
push 0x404848
push 0x20c
push dword [ebp - 4]
push dword [esi]
call dword [sym.imp.MSVCRT40.dll_qsort]
add esp, 0x10
xor ebx, ebx
test edi, edi
jne 0x404ac8
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
cmp eax, ebx
mov dword [ecx], eax
jne 0x404ad9
jmp 0x404acf
xor ebx, ebx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], ebx
push dword [esi]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [esi], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret