Function at 0x1004e5a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [ebp + 8]
push esi
push 9
xor esi, esi
push 0x10017b0
mov dword [eax], esi
lea eax, [ebp - 0x81c]
push 0x100179c
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x81c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1005121
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x18]
push eax
push esi
mov esi, 0x1001788
push esi
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x100511f
push 1
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll_calloc]
mov edi, eax
test edi, edi
pop ecx
pop ecx
mov dword [ebp - 4], edi
je 0x100511f
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
push 0
push esi
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x100510f
cmp word [edi], ax
mov esi, edi
je 0x1004f91
mov ebx, dword [sym.imp.msvcrt.dll_isdigit]
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1001778
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1004f51
lea edi, [esi - 4]
jmp 0x1004f32
dec edi
dec edi
movzx eax, word [edi]
push eax
call ebx
test eax, eax
pop ecx
jne 0x1004f30
add edi, 2
lea eax, [ebp - 0x81c]
push edi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
jmp 0x1004f7e
push 0x1001760
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1004f7f
lea edi, [esi - 4]
jmp 0x1004f66
dec edi
dec edi
movzx eax, word [edi]
push eax
call ebx
test eax, eax
pop ecx
jne 0x1004f64
add edi, 2
push edi
call dword [sym.imp.msvcrt.dll__wtol]
mov dword [ebp - 0x14], eax
pop ecx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
pop ecx
jne 0x1004f17
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_free]
mov eax, 0xc800
push 1
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.msvcrt.dll_calloc]
add esp, 0xc
test eax, eax
mov dword [ebp - 4], eax
je 0x100511f
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x81c]
push eax
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1005015
cmp dword [ebp - 8], eax
jbe 0x100510f
mov ecx, dword [ebp - 4]
cmp word [ecx], 0x50
jne 0x100510f
cmp word [ecx + 2], 0x45
jne 0x100510f
cmp word [ecx + 4], 0x52
jne 0x100510f
cmp word [ecx + 6], 0x46
je 0x1005052
cmp eax, 0xea
jne 0x100510f
add dword [ebp - 8], 0x6400
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_realloc]
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [ebp - 4], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x1004fb9
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x18]
add esi, eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x20]
add eax, esi
xor edx, edx
test ecx, ecx
jbe 0x1005080
mov edi, dword [ebp - 0x14]
cmp dword [eax + 4], edi
je 0x100507a
add eax, 0x28
inc edx
cmp edx, ecx
jb 0x1005068
jmp 0x1005080
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x28]
imul eax, eax, 0x20c
push 1
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.msvcrt.dll_calloc]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x100510f
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0x28]
and dword [ebp + 8], 0
mov dword [ecx], eax
mov edi, dword [esi + 4]
add edi, esi
cmp dword [esi + 0x28], 0
jbe 0x100510f
mov ebx, dword [ebp - 0xc]
add ebx, 4
mov eax, dword [edi + 0x10]
add eax, edi
cmp word [eax], 0
je 0x10050df
push eax
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x1001754
push ebx
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
jmp 0x10050ed
push 0x1001744
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
add eax, edi
mov ecx, dword [eax + ecx]
mov dword [ebx - 4], ecx
mov edi, dword [eax]
add edi, eax
add ebx, 0x20c
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [esi + 0x28]
jb 0x10050bb
cmp dword [ebp - 4], 0
je 0x100511f
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop edi
pop ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xc]
pop esi
leave
ret 4