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

Disassembly:
push 0x430
mov eax, 0x411901
call fcn.00410c01
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x42c]
push eax
xor edi, edi
push 0x20019
push edi
push 0x403a58
push SysStringLen
mov esi, edi
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x428], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, eax
test edx, edx
je 0x40d159
call fcn.0040d0d5
test edx, edx
jg 0x40d151
mov esi, edx
jmp 0x40d3f6
movzx esi, dx
jmp 0x40d3f0
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], 0x208
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x438]
push eax
push edi
push 0x403af8
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40d1fb
cmp dword [ebp - 0x438], 1
jne 0x40d1fb
lea ecx, [ebp - 0x434]
call fcn.0040d71c
lea ecx, [ebp - 0x430]
mov dword [ebp - 4], edi
call fcn.0040d71c
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x434]
call fcn.0040d6d9
push edi
lea ecx, [ebp - 0x430]
call fcn.0040d6d9
lea eax, [ebp - 0x434]
mov dword [ebp - 4], 2
push eax
push 0x403af8
mov ecx, ebx
call fcn.0040d66f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x434]
call fcn.0040c27b
push 0x104
lea ecx, [ebp - 0x424]
mov eax, edi
push ecx
push eax
push dword [ebp - 0x42c]
inc edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x40d3d5
movzx eax, word [ebp - 0x424]
push eax
call dword [sym.imp.msvcrt.dll_tolower]
pop ecx
cmp eax, 0x76
jne 0x40d246
movzx eax, word [ebp - 0x422]
push eax
call dword [sym.imp.msvcrt.dll_isdigit]
pop ecx
test eax, eax
jne 0x40d259
movzx eax, word [ebp - 0x424]
push eax
call dword [sym.imp.msvcrt.dll_isdigit]
pop ecx
test eax, eax
je 0x40d1fb
and dword [ebp - 0x43c], 0
lea eax, [ebp - 0x43c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d1fb
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], 0x208
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x438]
push eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x43c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40d3b2
cmp dword [ebp - 0x438], 1
jne 0x40d3b2
lea ecx, [ebp - 0x434]
mov word [ebp - 0x16], ax
call fcn.0040d71c
lea ecx, [ebp - 0x430]
call fcn.0040d71c
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], 3
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40d2f9
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x434]
call fcn.0040d842
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], 0x208
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x438]
push eax
push esi
push 0x403b04
push dword [ebp - 0x43c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40d388
cmp dword [ebp - 0x438], 1
jne 0x40d388
lea ecx, [ebp - 0x21c]
mov word [ebp - 0x16], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40d366
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x430]
call fcn.0040d842
lea eax, [ebp - 0x434]
mov ecx, ebx
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.0040d66f
mov esi, eax
test esi, esi
js 0x40d3c3
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x434]
call fcn.0040c27b
push dword [ebp - 0x43c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40d1fb
call fcn.0040d0d5
lea ecx, [ebp - 0x434]
call fcn.0040c27b
jmp 0x40d3f6
cmp eax, 0x103
je 0x40d3f6
call fcn.0040d0d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40d3f6
movzx esi, si
or esi, 0x80070000
cmp dword [ebp - 0x42c], 0
je 0x40d40b
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
call fcn.00410b9e
ret 4