Function at 0x408950
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x410344]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push esi
mov dword [ebp - 0x20], 0
je 0x408c8b
cmp dword [ebp + 0xc], 0
je 0x408c8b
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x408c8b
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x408c8b
push edi
mov dword [eax], 0xffffffff
lea eax, [ebp - 0x20]
mov edi, dword [esi]
push eax
push 0x20019
push 0
push 0x403084
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x40ae8d
push ebx
push 0x200
call fcn.00409248
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408c85
xor edi, edi
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x30]
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 - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ecx, eax
mov dword [ebp - 0x24], 1
cmp ecx, 0x103
je 0x40afee
test ecx, ecx
jne 0x40afca
xor eax, eax
push ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], eax
call fcn.00408dc0
test al, al
jne 0x408bbd
push ebx
mov dword [ebp - 0x10], 0
call fcn.00408dc0
test al, al
jne 0x408bbd
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 0x408bbd
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40aef6
movzx eax, word [esi]
mov ecx, ebx
mov byte [ebp - 5], 1
cmp eax, 0x30
jae 0x40af19
xor eax, eax
cmp ax, word [ebx]
je 0x40af4c
cmp ebx, esi
jae 0x40af4c
lea ebx, [ebx]
cmp word [ecx], 0x30
je 0x40af2f
mov eax, esi
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x14
jg 0x40af3f
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 0x40af22
cmp eax, 0x7fffffff
ja 0x40af22
mov dl, byte [ebp - 5]
test dl, dl
je 0x408bbd
xor ecx, ecx
test dl, dl
je 0x408bbd
test ecx, ecx
jne 0x408bbd
cmp eax, dword [ebp - 0x14]
jle 0x408bbd
mov esi, dword [ebp - 0x1c]
inc esi
mov dword [ebp - 0x14], eax
test edi, edi
je 0x408b1f
push edi
call sub.msvcrt.dll_free
add esp, 4
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00409248
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x408c85
xor eax, eax
test esi, esi
je 0x40af56
cmp esi, 0x7fffffff
ja 0x40af56
test eax, eax
js 0x40af6d
mov dword [ebp - 0x10], 0
mov ecx, edi
test esi, esi
je 0x40af60
mov edx, SysReAllocString
mov edi, ebx
sub edx, esi
sub edi, dword [ebp - 0xc]
lea eax, [edx + esi]
test eax, eax
je 0x408ba2
movzx eax, word [edi + ecx]
test ax, ax
je 0x408ba2
mov word [ecx], ax
add ecx, 2
sub esi, 1
jne 0x408b82
jmp 0x40af60
test esi, esi
je 0x40af60
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
xor edx, edx
mov word [ecx], dx
test eax, eax
js 0x408c85
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], 0x100
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x24]
mov ecx, eax
cmp ecx, 0x103
jne 0x408a15
test edi, edi
je 0x40afee
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 0x403018
push 0x4106d0
call fcn.00408c90
add esp, 0x18
test al, al
je 0x408c85
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 0x40af7f
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x408c62
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x408c6f
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.00409600
mov esp, ebp
pop ebp
ret 0x10
mov byte [ebp - 5], 0
jmp 0x408c54
xor al, al
jmp 0x408c74
cmp ecx, 2
jne 0x40aed0
mov eax, dword [0x4106d4]
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
test edi, edi
jne 0x40aeb8
push 0x403084
push 0x1e
push edi
push eax
call dword [0x4111f8]
call esi
add esp, 0x10
jmp 0x40aeef
push edi
push 0x403084
push 0x27
push 0
push eax
call dword [0x4111f8]
call esi
add esp, 0x14
jmp 0x40aeef
mov edi, dword [0x4106d4]
push 0x403084
push 0x14
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4111f8]
mov ecx, edi
call esi
xor al, al
jmp 0x408c73
lea ecx, [ebp - 0x28]
push ecx
push eax
push ebx
call fcn.0040b5e9
mov dl, al
test dl, dl
je 0x408bbd
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x28]
add ecx, 2
jmp 0x408af2
cmp eax, 0x39
ja 0x408a87
mov eax, dword [ebp - 0x18]
xor dl, dl
mov ecx, dword [ebp - 0x10]
jmp 0x408af2
add ecx, 2
cmp ecx, esi
jb 0x408aa0
jmp 0x408aaa
mov eax, dword [ebp - 0x18]
xor dl, dl
mov ecx, dword [ebp - 0x10]
jmp 0x408af2
mov eax, dword [ebp - 0x18]
xor dl, dl
jmp 0x408ae8
mov eax, 0x80070057
jmp 0x408b5d
sub ecx, 2
mov eax, 0x8007007a
jmp 0x408bad
test esi, esi
je 0x408bb5
xor ecx, ecx
mov word [edi], cx
jmp 0x408bb5
cmp ecx, 2
jne 0x40afc3
mov eax, dword [0x4106d4]
test esi, esi
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
jne 0x40afaa
push edi
push 0x1e
push 0
push eax
call dword [0x4111f8]
call esi
add esp, 0x10
jmp 0x408c85
push dword [ebp - 0xc]
push edi
push 0x27
push 0
push eax
call dword [0x4111f8]
call esi
add esp, 0x14
jmp 0x408c85
push dword [ebp - 0x14]
push 0x14
jmp 0x40afd1
push 0x403084
push 0x13
mov edi, dword [0x4106d4]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4111f8]
mov ecx, edi
call esi
jmp 0x408c85
mov eax, dword [0x4106d4]
push 0x1d
push 0
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x4111f8]
call esi
add esp, 0xc
jmp 0x408c85