Function at 0x408d90
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x410358]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push esi
mov dword [ebp - 0x20], 0
je 0x4090cb
cmp dword [ebp + 0xc], 0
je 0x4090cb
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4090cb
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4090cb
push edi
mov dword [eax], 0xffffffff
lea eax, [ebp - 0x20]
mov edi, dword [esi]
push eax
push 0x20019
push 0
push 0x4030a4
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, eax
test ecx, ecx
jne 0x40b1f5
push ebx
push 0x200
call fcn.0040972e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4090c5
xor edi, edi
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], pe_nt_image_headers32
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 0x40b356
test ecx, ecx
jne 0x40b332
xor eax, eax
push ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], eax
call fcn.00409200
test al, al
jne 0x408ffd
push ebx
mov dword [ebp - 0x10], 0
call fcn.00409200
test al, al
jne 0x408ffd
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 0x408ffd
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40b25e
movzx eax, word [esi]
mov ecx, ebx
mov byte [ebp - 5], 1
cmp eax, 0x30
jae 0x40b281
xor eax, eax
cmp ax, word [ebx]
je 0x40b2b4
cmp ebx, esi
jae 0x40b2b4
lea ebx, [ebx]
cmp word [ecx], 0x30
je 0x40b297
mov eax, esi
sub eax, ecx
and eax, 0xfffffffe
cmp eax, 0x14
jg 0x40b2a7
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 0x40b28a
cmp eax, 0x7fffffff
ja 0x40b28a
mov dl, byte [ebp - 5]
test dl, dl
je 0x408ffd
xor ecx, ecx
test dl, dl
je 0x408ffd
test ecx, ecx
jne 0x408ffd
cmp eax, dword [ebp - 0x14]
jle 0x408ffd
mov esi, dword [ebp - 0x1c]
inc esi
mov dword [ebp - 0x14], eax
test edi, edi
je 0x408f5f
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.0040972e
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x4090c5
xor eax, eax
test esi, esi
je 0x40b2be
cmp esi, 0x7fffffff
ja 0x40b2be
test eax, eax
js 0x40b2d5
mov dword [ebp - 0x10], 0
mov ecx, edi
test esi, esi
je 0x40b2c8
mov edx, SysReAllocString
mov edi, ebx
sub edx, esi
sub edi, dword [ebp - 0xc]
lea eax, [edx + esi]
test eax, eax
je 0x408fe2
movzx eax, word [edi + ecx]
test ax, ax
je 0x408fe2
mov word [ecx], ax
add ecx, 2
sub esi, 1
jne 0x408fc2
jmp 0x40b2c8
test esi, esi
je 0x40b2c8
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
xor edx, edx
mov word [ecx], dx
test eax, eax
js 0x4090c5
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], pe_nt_image_headers32
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 0x408e55
test edi, edi
je 0x40b356
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 0x403038
push 0x4106d0
call fcn.004090d0
add esp, 0x18
test al, al
je 0x4090c5
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 0x40b2e7
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4090a2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x4090af
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.00409a40
mov esp, ebp
pop ebp
ret 0x10
mov byte [ebp - 5], 0
jmp 0x409094
xor al, al
jmp 0x4090b4
cmp ecx, 2
jne 0x40b238
mov eax, dword [0x4106d4]
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
test edi, edi
jne 0x40b220
push 0x4030a4
push 0x1e
push edi
push eax
call dword [0x411204]
call esi
add esp, 0x10
jmp 0x40b257
push edi
push 0x4030a4
push 0x27
push 0
push eax
call dword [0x411204]
call esi
add esp, 0x14
jmp 0x40b257
mov edi, dword [0x4106d4]
push 0x4030a4
push 0x14
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x411204]
mov ecx, edi
call esi
xor al, al
jmp 0x4090b3
lea ecx, [ebp - 0x28]
push ecx
push eax
push ebx
call fcn.0040b9b5
mov dl, al
test dl, dl
je 0x408ffd
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x28]
add ecx, 2
jmp 0x408f32
cmp eax, 0x39
ja 0x408ec7
mov eax, dword [ebp - 0x18]
xor dl, dl
mov ecx, dword [ebp - 0x10]
jmp 0x408f32
add ecx, 2
cmp ecx, esi
jb 0x408ee0
jmp 0x408eea
mov eax, dword [ebp - 0x18]
xor dl, dl
mov ecx, dword [ebp - 0x10]
jmp 0x408f32
mov eax, dword [ebp - 0x18]
xor dl, dl
jmp 0x408f28
mov eax, 0x80070057
jmp 0x408f9d
sub ecx, 2
mov eax, 0x8007007a
jmp 0x408fed
test esi, esi
je 0x408ff5
xor ecx, ecx
mov word [edi], cx
jmp 0x408ff5
cmp ecx, 2
jne 0x40b32b
mov eax, dword [0x4106d4]
test esi, esi
mov esi, dword [eax]
mov esi, dword [esi + 4]
mov ecx, esi
jne 0x40b312
push edi
push 0x1e
push 0
push eax
call dword [0x411204]
call esi
add esp, 0x10
jmp 0x4090c5
push dword [ebp - 0xc]
push edi
push 0x27
push 0
push eax
call dword [0x411204]
call esi
add esp, 0x14
jmp 0x4090c5
push dword [ebp - 0x14]
push 0x14
jmp 0x40b339
push 0x4030a4
push 0x13
mov edi, dword [0x4106d4]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x411204]
mov ecx, edi
call esi
jmp 0x4090c5
mov eax, dword [0x4106d4]
push 0x1d
push 0
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x411204]
call esi
add esp, 0xc
jmp 0x4090c5