Function at 0x100556c
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x100900c]
push esi
push edi
push 9
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor edi, edi
push 0x1001798
push 0x1001784
mov dword [ebp - 0x828], eax
mov dword [eax], edi
mov esi, 0x400
lea eax, [ebp - 0x804]
push esi
push eax
mov dword [ebp - 0x810], edi
mov dword [ebp - 0x820], edi
mov dword [ebp - 0x818], edi
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x14
cmp eax, 1
mov word [ebp - 6], di
jl 0x10058f4
cmp eax, esi
je 0x10058f4
lea eax, [ebp - 0x810]
push eax
push 0x20019
push edi
lea eax, [ebp - 0x804]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10058f4
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x80c]
push eax
push edi
lea eax, [ebp - 0x81c]
push eax
push edi
mov esi, 0x1001770
push esi
push dword [ebp - 0x810]
call ebx
test eax, eax
jne 0x10058f3
push 1
push dword [ebp - 0x80c]
call dword [sym.imp.msvcrt.dll_calloc]
mov edi, eax
test edi, edi
pop ecx
pop ecx
mov dword [ebp - 0x808], edi
je 0x10058f1
lea eax, [ebp - 0x80c]
push eax
push edi
lea eax, [ebp - 0x81c]
push eax
push 0
push esi
push dword [ebp - 0x810]
call ebx
test eax, eax
jne 0x10058db
cmp word [edi], ax
je 0x1005701
mov ebx, dword [sym.imp.msvcrt.dll_isdigit]
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1001760
push edi
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10056ba
lea esi, [edi - 4]
jmp 0x1005697
dec esi
dec esi
movzx eax, word [esi]
push eax
call ebx
test eax, eax
pop ecx
jne 0x1005695
push 0x400
add esi, 2
push esi
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x10056eb
push 0x1001748
push edi
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10056eb
lea esi, [edi - 4]
jmp 0x10056cf
dec esi
dec esi
movzx eax, word [esi]
push eax
call ebx
test eax, eax
pop ecx
jne 0x10056cd
add esi, 2
push esi
call dword [sym.imp.msvcrt.dll__wtol]
pop ecx
mov dword [ebp - 0x814], eax
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
lea edi, [edi + eax*2 + 2]
cmp word [edi], 0
pop ecx
jne 0x100567c
push dword [ebp - 0x808]
call dword [sym.imp.msvcrt.dll_free]
mov eax, 0xc800
push 1
push eax
mov dword [ebp - 0x80c], eax
call dword [sym.imp.msvcrt.dll_calloc]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x808], eax
je 0x10058f1
mov eax, dword [ebp - 0x80c]
mov dword [ebp - 0x824], eax
lea eax, [ebp - 0x824]
push eax
push dword [ebp - 0x808]
lea eax, [ebp - 0x81c]
push eax
push 0
lea eax, [ebp - 0x804]
push eax
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10057a3
cmp dword [ebp - 0x80c], eax
jbe 0x10058db
mov ecx, dword [ebp - 0x808]
cmp word [ecx], 0x50
jne 0x10058db
cmp word [ecx + 2], 0x45
jne 0x10058db
cmp word [ecx + 4], 0x52
jne 0x10058db
cmp word [ecx + 6], 0x46
je 0x10057f7
cmp eax, 0xea
jne 0x10058db
add dword [ebp - 0x80c], 0x6400
push dword [ebp - 0x80c]
push dword [ebp - 0x808]
call dword [sym.imp.msvcrt.dll_realloc]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x10058db
mov ecx, dword [ebp - 0x80c]
mov edx, ecx
shr ecx, 2
xor eax, eax
mov dword [ebp - 0x808], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x1005732
mov eax, dword [ebp - 0x808]
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 0x100582e
mov edi, dword [ebp - 0x814]
cmp dword [eax + 4], edi
je 0x1005825
add eax, 0x28
inc edx
cmp edx, ecx
jb 0x1005810
jmp 0x100582e
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x820], eax
mov eax, dword [esi + 0x28]
imul eax, eax, 0x20c
push 1
push eax
mov dword [ebp - 0x80c], eax
call dword [sym.imp.msvcrt.dll_calloc]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x818], eax
je 0x10058db
mov eax, dword [esi + 0x28]
mov ecx, dword [ebp - 0x828]
and dword [ebp - 0x814], 0
mov dword [ecx], eax
mov edi, dword [esi + 4]
add edi, esi
cmp dword [esi + 0x28], 0
jbe 0x10058db
mov ebx, dword [ebp - 0x818]
add ebx, 4
mov eax, dword [edi + 0x10]
add eax, edi
cmp word [eax], 0
je 0x10058a2
push 0xff
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x100173c
push ebx
call dword [sym.imp.msvcrt.dll_wcscat]
jmp 0x10058ae
push 0x100172c
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [edi]
add eax, edi
pop ecx
pop ecx
mov ecx, dword [ebp - 0x820]
mov ecx, dword [eax + ecx]
mov dword [ebx - 4], ecx
mov edi, dword [eax]
add edi, eax
add ebx, 0x20c
inc dword [ebp - 0x814]
mov eax, dword [ebp - 0x814]
cmp eax, dword [esi + 0x28]
jb 0x100587c
cmp dword [ebp - 0x808], 0
je 0x10058f1
push dword [ebp - 0x808]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor edi, edi
pop ebx
cmp dword [ebp - 0x810], edi
pop edi
pop esi
je 0x100590a
push dword [ebp - 0x810]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x818]
call fcn.01007b1d
leave
ret 4