Function at 0x408e60
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x415004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push esi
mov dword [ebp - 0x18], 0
je 0x4091c7
cmp dword [ebp + 0xc], 0
je 0x4091c7
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4091c7
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4091c7
push edi
mov dword [eax], 0xffffffff
lea eax, [ebp - 0x18]
mov edi, dword [esi]
push eax
push 0x20019
push 0
push 0x401334
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x40ca4c
push ebx
push 0x200
call fcn.00409842
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4091c1
xor edi, edi
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1c], 0x100
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x1c]
push eax
push ebx
push edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ecx, eax
mov dword [ebp - 0x28], 1
cmp ecx, 0x103
je 0x40cbad
test ecx, ecx
jne 0x40cb89
xor eax, eax
push ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
call fcn.004088b0
test al, al
jne 0x4090eb
lea eax, [ebp - 0x24]
test eax, eax
je 0x4090eb
lea eax, [ebp - 0x2c]
test eax, eax
je 0x4090eb
push ebx
mov dword [ebp - 0x10], 0
call fcn.004088b0
test al, al
jne 0x4090eb
lea eax, [ebp - 0x30]
test eax, eax
je 0x4090eb
push 0x2e
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
push 0
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4090eb
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40cab5
movzx eax, word [esi]
mov ecx, ebx
mov byte [ebp - 5], 1
cmp eax, 0x30
jae 0x40cad8
xor eax, eax
cmp ax, word [ebx]
je 0x40cb0b
cmp ebx, esi
jae 0x40cb0b
jmp 0x408fd0
cmp word [ecx], 0x30
je 0x40caee
mov eax, esi
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x14
jg 0x40cafe
push 0xa
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push ecx
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
cmp esi, dword [ebp - 0xc]
jne 0x40cae1
cmp eax, 0x7fffffff
ja 0x40cae1
mov cl, byte [ebp - 5]
test cl, cl
je 0x4090eb
xor edx, edx
test cl, cl
je 0x4090eb
test edx, edx
jne 0x4090eb
cmp eax, dword [ebp - 0x14]
jle 0x4090eb
mov esi, dword [ebp - 0x1c]
inc esi
mov dword [ebp - 0x14], eax
test edi, edi
jne 0x4091b3
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00409842
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x4091c1
xor eax, eax
test esi, esi
je 0x40cb15
cmp esi, 0x7fffffff
ja 0x40cb15
test eax, eax
js 0x40cb2c
mov dword [ebp - 0x10], 0
mov ecx, edi
test esi, esi
je 0x40cb1f
mov edx, SysReAllocString
mov edi, ebx
sub edx, esi
sub edi, dword [ebp - 0xc]
lea ecx, [ecx]
lea eax, [edx + esi]
test eax, eax
je 0x4090d0
movzx eax, word [edi + ecx]
test ax, ax
je 0x4090d0
mov word [ecx], ax
add ecx, 2
sub esi, 1
jne 0x4090b0
jmp 0x40cb1f
test esi, esi
je 0x40cb1f
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
xor edx, edx
mov word [ecx], dx
test eax, eax
js 0x4091c1
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1c], 0x100
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x28]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x28]
mov ecx, eax
cmp ecx, 0x103
jne 0x408f25
test edi, edi
je 0x40cbad
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x14]
push edi
mov dword [esi], edi
mov edi, dword [ebp + 0xc]
push 0x17
mov dword [eax], ecx
lea eax, [ebp - 0xc]
push eax
push edi
push 0x4012c8
push 0x41579c
call fcn.004091d0
add esp, 0x18
test al, al
je 0x4091c1
push dword [ebp + 8]
mov edi, dword [edi]
mov esi, dword [esi]
push 0x20019
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], edi
mov byte [ebp - 5], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x40cb3e
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x409190
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x40919d
push ebx
call sub.msvcrt.dll_free
add esp, 4
mov al, byte [ebp - 5]
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00409c10
mov esp, ebp
pop ebp
ret 0x10
push edi
call sub.msvcrt.dll_free
add esp, 4
jmp 0x40904a
mov byte [ebp - 5], 0
jmp 0x409182
xor al, al
jmp 0x4091a2
cmp ecx, 2
jne 0x40ca8f
mov eax, dword [0x4157a0]
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
test edi, edi
jne 0x40ca77
push 0x401334
push 0x1e
push edi
push eax
call dword [0x41626c]
call esi
add esp, 0x10
jmp 0x40caae
push edi
push 0x401334
push 0x27
push 0
push eax
call dword [0x41626c]
call esi
add esp, 0x14
jmp 0x40caae
mov edi, dword [0x4157a0]
push 0x401334
push 0x14
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x41626c]
mov ecx, edi
call esi
xor al, al
jmp 0x4091a1
lea ecx, [ebp - 0x24]
push ecx
push eax
push ebx
call fcn.0040d28f
mov cl, al
test cl, cl
je 0x4090eb
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
add edx, 2
jmp 0x409022
cmp eax, 0x39
ja 0x408fb8
mov eax, dword [ebp - 0x20]
xor cl, cl
mov edx, dword [ebp - 0x10]
jmp 0x409022
add ecx, 2
cmp ecx, esi
jb 0x408fd0
jmp 0x408fda
mov eax, dword [ebp - 0x20]
xor cl, cl
mov edx, dword [ebp - 0x10]
jmp 0x409022
mov eax, dword [ebp - 0x20]
xor cl, cl
jmp 0x409018
mov eax, 0x80070057
jmp 0x409088
sub ecx, 2
mov eax, 0x8007007a
jmp 0x4090db
test esi, esi
je 0x4090e3
xor ecx, ecx
mov word [edi], cx
jmp 0x4090e3
cmp ecx, 2
jne 0x40cb82
mov eax, dword [0x4157a0]
test esi, esi
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
jne 0x40cb69
push edi
push 0x1e
push 0
push eax
call dword [0x41626c]
call esi
add esp, 0x10
jmp 0x4091c1
push dword [ebp - 0xc]
push edi
push 0x27
push 0
push eax
call dword [0x41626c]
call esi
add esp, 0x14
jmp 0x4091c1
push dword [ebp - 0x14]
push 0x14
jmp 0x40cb90
push 0x401334
push 0x13
mov edi, dword [0x4157a0]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x41626c]
mov ecx, edi
call esi
jmp 0x4091c1
mov eax, dword [0x4157a0]
push 0x1d
push 0
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x41626c]
call esi
add esp, 0xc
jmp 0x4091c1