Function at 0x1004a82
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010047d8
xor ebx, ebx
cmp dword [ebp + 0x1c], ebx
je 0x1004e9d
cmp eax, ebx
jne 0x1004e9d
push ebx
push ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 8]
call esi
cmp eax, ebx
jne 0x1004e9d
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1004e9d
mov eax, dword [ebp - 8]
inc dword [ebp - 0x14]
imul eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.msvcrt.dll_calloc]
push 2
push eax
call edi
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
jne 0x1004b21
mov dword [ebp - 4], 8
jmp 0x1004e6d
push 4
push dword [ebp - 8]
call edi
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x1004bbc
xor esi, esi
cmp dword [ebp - 8], ebx
jbe 0x1004b92
cmp dword [ebp - 4], ebx
jne 0x1004b7c
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov ecx, esi
imul ecx, dword [ebp - 0x14]
push ebx
push ebx
lea ecx, [edx + ecx*2]
lea eax, [eax + esi*4]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x14]
push ebx
push ebx
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x28]
push ecx
push dword [eax]
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc esi
cmp esi, dword [ebp - 8]
mov dword [ebp - 4], eax
jb 0x1004b3c
cmp eax, ebx
je 0x1004b92
push dword [ebp - 0x20]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x10]
call esi
pop ecx
jmp 0x1004e99
mov eax, dword [ebp - 0xc]
inc dword [ebp - 0x18]
imul eax, dword [ebp - 0x18]
push 2
push eax
call edi
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
je 0x1004bbc
push 4
push dword [ebp - 0xc]
call edi
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
mov dword [ebp - 0x1c], edi
jne 0x1004bc8
mov dword [ebp - 4], 8
jmp 0x1004e63
xor esi, esi
cmp dword [ebp - 0xc], ebx
jbe 0x1004c2b
cmp dword [ebp - 4], ebx
jne 0x1004c0b
mov ecx, dword [ebp - 0x24]
mov eax, esi
imul eax, dword [ebp - 0x18]
push ebx
push ebx
lea eax, [ecx + eax*2]
mov dword [edi + esi*4], eax
mov eax, dword [ebp - 0x18]
push ebx
push ebx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [edi + esi*4]
push esi
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc esi
cmp esi, dword [ebp - 0xc]
mov dword [ebp - 4], eax
jb 0x1004bcf
cmp eax, ebx
je 0x1004c2b
push dword [ebp - 0x20]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x24]
call esi
push edi
call esi
add esp, 0x10
jmp 0x1004e9a
cmp dword [ebp - 8], ebx
mov dword [ebp - 0x30], ebx
jbe 0x1004de5
mov esi, dword [ebp - 0x10]
mov edi, dword [sym.imp.msvcrt.dll_wcscat]
cmp dword [ebp - 4], ebx
jne 0x1004de5
cmp dword [esi], ebx
je 0x1004dd3
xor eax, eax
cmp dword [ebp - 0xc], ebx
mov dword [ebp - 0x2c], eax
jbe 0x1004dd3
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + eax*4]
cmp eax, ebx
je 0x1004c78
push eax
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x1004c89
mov eax, dword [ebp - 0x2c]
inc eax
cmp eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c], eax
jb 0x1004c5f
jmp 0x1004dd3
cmp dword [ebp + 0x18], 2
je 0x1004c95
cmp dword [ebp + 0x18], 3
jne 0x1004cae
push ebx
push dword [esi]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010041eb
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1004dd3
lea eax, [ebp - 0x34]
push eax
push 0x20019
push ebx
push dword [esi]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1004dd3
lea eax, [ebp - 0x38]
push eax
push 0x20019
push ebx
push dword [esi]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1004dd3
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
push 2
push dword [ebp + 0xc]
call ebx
push dword [esi]
mov dword [ebp - 0x3c], eax
call ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax + 2]
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x3c], ebx
je 0x1004eae
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x100124c
push ebx
call edi
push dword [esi]
push ebx
call edi
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0x18
push 2
push dword [ebp + 0x14]
call ebx
push dword [esi]
mov dword [ebp - 4], eax
call ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 2]
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x40], ebx
je 0x1004ea4
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x100124c
push ebx
call edi
push dword [esi]
push ebx
call edi
add esp, 0x18
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 0x38]
push dword [ebp + 0xc]
push dword [ebp - 0x34]
call fcn.01004a82
push dword [ebp - 0x3c]
mov ebx, dword [sym.imp.msvcrt.dll_free]
mov dword [ebp - 4], eax
call ebx
push dword [ebp - 0x40]
call ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ecx
pop ecx
push dword [ebp - 0x34]
call ebx
push dword [ebp - 0x38]
call ebx
and dword [esi], 0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
and dword [ecx + eax*4], 0
xor ebx, ebx
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
add esi, 4
cmp eax, dword [ebp - 8]
jb 0x1004c40
xor edi, edi
xor esi, esi
inc edi
cmp dword [ebp - 8], ebx
jbe 0x1004e25
cmp dword [ebp - 4], ebx
jne 0x1004e25
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + esi*4]
cmp eax, ebx
je 0x1004e1f
cmp dword [ebp + 0x18], edi
je 0x1004e09
cmp dword [ebp + 0x18], 3
jne 0x1004e19
push edi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010041eb
mov dword [ebp - 4], eax
mov dword [0x1007020], edi
inc esi
cmp esi, dword [ebp - 8]
jb 0x1004def
xor esi, esi
cmp dword [ebp - 0xc], ebx
jbe 0x1004e63
cmp dword [ebp - 4], ebx
jne 0x1004e63
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi*4]
cmp eax, ebx
je 0x1004e5d
cmp dword [ebp + 0x18], edi
je 0x1004e46
cmp dword [ebp + 0x18], 3
jne 0x1004e57
push 2
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.010041eb
mov dword [ebp - 4], eax
mov dword [0x1007020], edi
inc esi
cmp esi, dword [ebp - 0xc]
jb 0x1004e2c
push dword [ebp - 0x20]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x10], ebx
je 0x1004e7c
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x24], ebx
je 0x1004e8b
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x1c], ebx
je 0x1004e9a
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x18
push dword [ebp - 0x3c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov dword [ebp - 4], 8
xor ebx, ebx
jmp 0x1004e63