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

Disassembly:
push 0x2c
push 0x41a418
call fcn.0041a21c
mov ebx, edx
mov dword [ebp - 0x2c], ebx
mov edi, ecx
mov dword [ebp - 0x28], edi
push 0x5b
pop ecx
call fcn.0040f759
mov ecx, ebx
call fcn.0040f59e
mov ecx, 0x401d94
call fcn.0040f59e
xor edx, edx
mov ecx, edx
xor ebx, ebx
inc ebx
mov dword [ebp - 0x34], 0x400
mov eax, ecx
inc ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x24]
push ecx
push edx
lea ecx, [ebp - 0x20]
push ecx
push edx
lea edx, [ebp - 0x34]
push edx
push 0x41c628
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov esi, eax
test esi, esi
je 0x40f49c
push 0xa
pop ecx
call fcn.0040f759
cmp esi, 0x103
je 0x40f393
mov dword [0x41be24], 0x8c
mov esi, dword [ebp - 0x2c]
lea ecx, [esi + 2]
xor edx, edx
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x40f39b
sub esi, ecx
sar esi, 1
lea ebx, [esi + 0x400]
mov dword [ebp - 4], edx
lea eax, [ebx + ebx]
call fcn.0041a3b0
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x3c], edi
mov dword [ebp - 4], 0xfffffffe
push dword [ebp - 0x2c]
mov edx, ebx
mov ecx, edi
call fcn.00404881
lea esi, [edi + esi*2]
push 0x5c
pop eax
mov word [esi], ax
add esi, 2
xor eax, eax
mov word [esi], ax
push 0x3ff
push esi
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x40f45a
xor ebx, ebx
inc ebx
lea eax, [ebp - 0x30]
push eax
push 9
push 0
push esi
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40f439
mov edx, edi
mov ecx, dword [ebp - 0x30]
call fcn.0040f311
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x41be24], 0x8d
je 0x40f595
jmp 0x40f443
mov dword [0x41be24], 0x8b
mov eax, ebx
inc ebx
push 0x3ff
push esi
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x40f3fe
cmp eax, 0x103
je 0x40f595
mov dword [0x41be24], 0x8c
jmp 0x40f595
cmp dword [ebp - 0x20], ebx
je 0x40f4b1
cmp dword [ebp - 0x20], 2
je 0x40f4b1
cmp dword [ebp - 0x20], 7
je 0x40f4b1
xor ecx, ecx
jmp 0x40f4b4
push 2
pop ecx
mov eax, dword [ebp - 0x24]
add eax, ecx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x40f57a
lea eax, [ebp - 0x24]
push eax
push esi
lea eax, [ebp - 0x20]
push eax
push 0
push 0x41c628
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f4f9
lea eax, [ebp - 0x24]
push eax
mov edx, esi
lea ecx, [ebp - 0x20]
call fcn.0040bd9d
test eax, eax
je 0x40f505
mov dword [0x41be24], 0x8d
jmp 0x40f56c
cmp dword [ebp - 0x34], 0
je 0x40f517
mov ecx, 0x41c628
call fcn.0040f5c1
jmp 0x40f51f
push 0x40
pop ecx
call fcn.0040f759
push 0x3d
pop ecx
call fcn.0040f759
mov edx, dword [ebp - 0x20]
mov eax, edx
sub eax, 1
je 0x40f55d
sub eax, 3
jne 0x40f551
cmp dword [ebp - 0x24], 4
jne 0x40f551
mov ecx, 0x401cb4
call fcn.0040f59e
mov edx, ebx
mov ecx, dword [esi]
call fcn.0040f715
jmp 0x40f564
push dword [ebp - 0x24]
mov ecx, esi
call fcn.0040f63b
jmp 0x40f564
mov ecx, esi
call fcn.0040f5c1
push 0xa
pop ecx
call fcn.0040f759
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x41be24]
jmp 0x40f584
mov eax, 0x8d
mov dword [0x41be24], eax
cmp eax, 0x8d
mov ecx, dword [ebp - 0x38]
push 0
pop edx
jne 0x40f347
lea esp, [ebp - 0x4c]
call fcn.0041a264
ret