Function at 0x1004dc0
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
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.01004b0f
xor ebx, ebx
cmp dword [ebp + 0x1c], ebx
je 0x10051dd
cmp eax, ebx
jne 0x10051dd
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 0x10051dd
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 0x10051dd
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 0x1004e61
mov dword [ebp - 4], 8
jmp 0x10051ad
push 4
push dword [ebp - 8]
call edi
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x1004efc
xor esi, esi
cmp dword [ebp - 8], ebx
jbe 0x1004ed2
cmp dword [ebp - 4], ebx
jne 0x1004ebc
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 0x1004e7c
cmp eax, ebx
je 0x1004ed2
push dword [ebp - 0x20]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x10]
call esi
pop ecx
jmp 0x10051d9
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 0x1004efc
push 4
push dword [ebp - 0xc]
call edi
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
mov dword [ebp - 0x1c], edi
jne 0x1004f08
mov dword [ebp - 4], 8
jmp 0x10051a3
xor esi, esi
cmp dword [ebp - 0xc], ebx
jbe 0x1004f6b
cmp dword [ebp - 4], ebx
jne 0x1004f4b
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 0x1004f0f
cmp eax, ebx
je 0x1004f6b
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 0x10051da
cmp dword [ebp - 8], ebx
mov dword [ebp - 0x30], ebx
jbe 0x1005125
mov esi, dword [ebp - 0x10]
mov edi, dword [sym.imp.msvcrt.dll_wcscat]
cmp dword [ebp - 4], ebx
jne 0x1005125
cmp dword [esi], ebx
je 0x1005113
xor eax, eax
cmp dword [ebp - 0xc], ebx
mov dword [ebp - 0x2c], eax
jbe 0x1005113
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + eax*4]
cmp eax, ebx
je 0x1004fb8
push eax
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x1004fc9
mov eax, dword [ebp - 0x2c]
inc eax
cmp eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c], eax
jb 0x1004f9f
jmp 0x1005113
cmp dword [ebp + 0x18], 2
je 0x1004fd5
cmp dword [ebp + 0x18], 3
jne 0x1004fee
push ebx
push dword [esi]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010044d1
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1005113
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 0x1005113
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 0x1005113
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 0x10051ee
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x100125c
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 0x10051e4
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x100125c
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.01004dc0
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 0x1004f80
xor edi, edi
xor esi, esi
inc edi
cmp dword [ebp - 8], ebx
jbe 0x1005165
cmp dword [ebp - 4], ebx
jne 0x1005165
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + esi*4]
cmp eax, ebx
je 0x100515f
cmp dword [ebp + 0x18], edi
je 0x1005149
cmp dword [ebp + 0x18], 3
jne 0x1005159
push edi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.010044d1
mov dword [ebp - 4], eax
mov dword [0x1008040], edi
inc esi
cmp esi, dword [ebp - 8]
jb 0x100512f
xor esi, esi
cmp dword [ebp - 0xc], ebx
jbe 0x10051a3
cmp dword [ebp - 4], ebx
jne 0x10051a3
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi*4]
cmp eax, ebx
je 0x100519d
cmp dword [ebp + 0x18], edi
je 0x1005186
cmp dword [ebp + 0x18], 3
jne 0x1005197
push 2
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.010044d1
mov dword [ebp - 4], eax
mov dword [0x1008040], edi
inc esi
cmp esi, dword [ebp - 0xc]
jb 0x100516c
push dword [ebp - 0x20]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x10], ebx
je 0x10051bc
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x24], ebx
je 0x10051cb
push dword [ebp - 0x24]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x1c], ebx
je 0x10051da
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 0x10051a3