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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405c6e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x984
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 1
mov byte [ebp - 0x14], 0
mov dword [ebp - 0x18], str.CCITRanges
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x128], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x127]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x13c], 0x104
lea eax, [ebp - 0x144]
push eax
push 0x20019
push 0
lea ecx, [ebp + 0x10]
call fcn.00401880
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4032d8
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x1c]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
cmp dword [ebp - 0x1c], 0
je 0x4032d8
mov ecx, dword [ebp - 0x1c]
shl ecx, 2
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
jne 0x4030cb
jmp 0x4032d8
mov edx, dword [ebp - 0x1c]
shl edx, 2
push edx
push 0xff
mov eax, dword [ebp - 0x134]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x20], 0
jmp 0x4030f8
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 0x1c]
jae 0x4032ab
mov byte [ebp - 0x128], 0
mov dword [ebp - 0x24], 0x104
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x128]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ecx, dword [ebp - 0x18]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
mov edx, dword [ebp - 0x18]
push edx
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4032a6
mov byte [ebp - 0x544], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x543]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x944], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x943]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [ebp - 0x128]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00401880
push eax
push str._s_s
lea edx, [ebp - 0x544]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x94c]
call fcn.00403b10
mov byte [ebp - 4], 2
lea eax, [ebp - 0x140]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x544]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403255
lea eax, [ebp - 0x13c]
push eax
lea ecx, [ebp - 0x944]
push ecx
lea edx, [ebp - 0x138]
push edx
push 0
push str.:Range
mov eax, dword [ebp - 0x140]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403255
mov ecx, dword [ebp - 0x140]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x944]
push edx
lea ecx, [ebp + 0xc]
call fcn.00401880
push eax
call fcn.00402ce0
add esp, 8
test eax, eax
jne 0x403255
mov byte [ebp - 0x14], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x94c]
call fcn.00403b40
jmp 0x4032d8
lea eax, [ebp - 0x11e]
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [ebp - 0x130], eax
mov edx, dword [ebp - 0x130]
cmp edx, dword [ebp - 0x1c]
jae 0x403297
mov eax, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x134]
mov edx, dword [ebp - 0x130]
mov dword [ecx + eax*4], edx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x94c]
call fcn.00403b40
jmp 0x4030ef
mov dword [ebp - 0x20], 0
jmp 0x4032bd
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x1c]
jae 0x4032d8
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x134]
cmp dword [eax + edx*4], 0xffffffff
jne 0x4032d6
jmp 0x4032d8
jmp 0x4032b4
cmp dword [ebp - 0x144], 0
je 0x4032ee
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x134], 0
je 0x403311
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp - 0x134], 0
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea ecx, [ebp + 0x10]
call fcn.00401880
push eax
push str._s_s_ld
mov edx, dword [ebp + 0x14]
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov al, byte [ebp - 0x14]
mov byte [ebp - 0x950], al
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.0040527e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call fcn.0040527e
mov al, byte [ebp - 0x950]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10