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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
xor edi, edi
push edi
push edi
push edi
lea eax, [ebp - 0x10]
push eax
push edi
push edi
lea eax, [ebp - 0x14]
push eax
push edi
push edi
push edi
push edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
cmp eax, edi
jne 0x10037b0
inc dword [ebp - 0x10]
push ebx
push esi
push 2
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_calloc]
mov ebx, eax
cmp ebx, edi
pop ecx
pop ecx
jne 0x10035e1
push 8
pop eax
jmp 0x10037ae
push dword [ebp + 0xc]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push 0x10014d8
push eax
call fcn.0100223a
add esp, 0xc
mov dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
push edi
push edi
push edi
push edi
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov esi, eax
cmp esi, edi
jne 0x100364a
push ebx
push dword [ebp + 8]
call fcn.01003418
mov esi, eax
cmp esi, 5
jne 0x100364a
push dword [ebp + 0xc]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
add eax, 0x40
push 0x1001628
push eax
call fcn.0100223a
add esp, 0x10
xor esi, esi
inc dword [ebp - 8]
cmp esi, edi
je 0x10035fd
push ebx
call dword [sym.imp.msvcrt.dll_free]
cmp esi, 0x103
pop ecx
jne 0x1003663
xor esi, esi
cmp esi, edi
je 0x100366e
mov eax, esi
jmp 0x10037ae
inc dword [ebp - 0x14]
push 2
push dword [ebp - 0x14]
call dword [sym.imp.msvcrt.dll_calloc]
cmp eax, edi
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x10035d9
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 8], edi
mov eax, dword [ebp - 0x14]
push edi
push edi
push edi
push edi
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x1003795
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push edi
push dword [ebp - 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push 2
push dword [ebp - 0xc]
mov dword [ebp - 4], eax
call ebx
push dword [ebp + 0xc]
mov esi, eax
call ebx
pop ecx
pop ecx
lea eax, [esi + eax + 2]
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
je 0x100378e
push dword [ebp + 0xc]
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x100124c
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
push dword [ebp - 0xc]
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x18
cmp dword [ebp + 0x10], edi
je 0x1003738
cmp dword [ebp - 4], edi
jne 0x1003738
push dword [ebp + 0x10]
push esi
push dword [ebp - 0x1c]
call fcn.01003596
mov dword [ebp - 4], eax
jmp 0x100376f
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x20
push 0x10014d8
push eax
call fcn.0100223a
add esp, 0xc
cmp dword [ebp - 4], 5
jne 0x100376f
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x40
push 0x10015d0
push eax
call fcn.0100223a
add esp, 0xc
mov dword [ebp - 4], edi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.msvcrt.dll_free]
inc dword [ebp - 8]
cmp dword [ebp - 4], edi
pop ecx
je 0x1003692
jmp 0x1003795
mov dword [ebp - 4], 8
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
cmp dword [ebp - 4], 0x103
pop ecx
jne 0x10037ab
mov dword [ebp - 4], edi
mov eax, dword [ebp - 4]
pop esi
pop ebx
pop edi
leave
ret 0xc