Function at 0x403cc0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x409671
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push ebx
push esi
mov esi, dword [esp + 0x25c]
mov ebx, 1
cmp esi, ebx
push edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
jne 0x403d0a
call fcn.004071b0
neg eax
sbb eax, eax
and al, 0
add eax, 0x201
mov dword [esp + 0x24], eax
test esi, esi
setne al
push eax
lea ecx, [esp + 0x3c]
call fcn.00407200
push 0x419b50
lea ecx, [esp + 0x14]
mov dword [esp + 0x254], 0
call fcn.00408dd6
push 0x419b50
lea ecx, [esp + 0x10]
mov byte [esp + 0x254], 1
call fcn.00408dd6
mov edi, dword [esp + 0x258]
mov byte [esp + 0x250], 2
cmp dword [edi], 0
jne 0x403d99
lea ecx, [esp + 0xc]
mov byte [esp + 0x250], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x250], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov dword [esp + 0x250], 0xffffffff
call fcn.00407250
mov eax, ebx
jmp 0x4041a1
mov eax, dword [esp + 0x25c]
xor esi, esi
test eax, eax
push ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0x104
mov dword [esp + 0x2c], esi
jle 0x404166
mov eax, 0xfffffef8
lea ebp, [edi + 0x108]
sub eax, edi
mov dword [esp + 0x34], eax
jmp 0x403dd5
mov edi, dword [esp + 0x25c]
mov eax, dword [ebp - 0x108]
cmp eax, 0x80000002
jne 0x403de9
push str.HKEY_LOCAL_MACHINE
jmp 0x403e03
cmp eax, 0x80000000
jne 0x403df7
push str.HKEY_CLASSES_ROOT
jmp 0x403e03
cmp eax, 0x80000001
jne 0x403e0c
push str.HKEY_CURRENT_USER
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp - 0x108]
push edx
lea eax, [ebp - 0x104]
push 0
push eax
push ecx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40405d
mov cl, byte [ebp + 4]
lea eax, [ebp + 4]
test cl, cl
je 0x404024
mov ecx, dword [ebp]
cmp ecx, 4
mov dword [esp + 0x38], ecx
jne 0x403e5a
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x20]
lea ebx, [ebp + 0x108]
push edx
push ebx
push ebp
push 0
push eax
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40408d
mov edi, ebx
or ecx, 0xffffffff
mov edx, dword [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
lea eax, [edx + ebp]
mov edx, dword [esp + 0x25c]
dec ecx
mov dword [esp + 0x30], eax
add eax, ecx
lea eax, [eax + edx + 0x20f]
cmp byte [eax], 0x22
jne 0x403eab
mov byte [eax], 0
dec ecx
cmp byte [ebx], 0x22
jne 0x403ee4
lea eax, [ecx - 1]
lea esi, [ebp + 0x109]
mov ecx, eax
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x25c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
add ecx, eax
mov byte [ecx + edx + 0x210], 0
cmp byte [ebp + 0x310], 1
jne 0x404024
cmp dword [esp + 0x38], 4
jne 0x403f18
lea eax, [ebp + 0x20c]
push 4
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x4040dd
jmp 0x404024
cmp byte [ebp + 0x311], 1
jne 0x403f92
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x149]
mov byte [esp + 0x148], 0
mov edx, dword [esp + 0x24]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x148]
push ecx
lea ecx, [edx + 4]
stosb byte es:[edi], al
call fcn.00407ae0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x148]
push str.ngsrv_
push eax
call edi
lea ecx, [ebp + 0x20c]
lea edx, [esp + 0x148]
push ecx
push edx
call edi
lea eax, [esp + 0x148]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4040dd
jmp 0x404024
lea edi, [ebp + 0x20c]
push edi
push str.ngcsp_qdccb.DLL
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x403fca
push edi
push 0x40d590
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x403fca
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4040dd
jmp 0x404024
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], 0
mov edx, dword [esp + 0x24]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x44]
push ecx
lea ecx, [edx + 4]
stosb byte es:[edi], al
call fcn.004079f0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x44]
push 0x40d58c
push eax
call edi
lea eax, [ebp + 0x20c]
lea ecx, [esp + 0x44]
push eax
push ecx
call edi
lea edx, [esp + 0x44]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40411c
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, 0x41
xor eax, eax
lea edi, [ebp + 0x108]
inc esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x260]
add ebp, 0x41c
cmp esi, eax
mov dword [esp + 0x2c], esi
jl 0x403dce
jmp 0x404166
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov eax, dword [esp + 0x10]
shl ecx, 5
add ecx, esi
shl ecx, 3
sub ecx, esi
lea edx, [edi + ecx*4 + 4]
lea ecx, [esp + 0x14]
push edx
push eax
push 0x40d578
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
jmp 0x4040c5
mov eax, esi
mov ecx, dword [esp + 0x25c]
shl eax, 5
add eax, esi
shl eax, 3
sub eax, esi
lea eax, [ecx + eax*4]
lea ecx, [esp + 0x14]
lea edx, [eax + 0x10c]
add eax, 4
push edx
push eax
mov eax, dword [esp + 0x18]
push eax
push 0x40d55c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404166
mov eax, esi
mov ecx, dword [esp + 0x25c]
shl eax, 5
add eax, esi
shl eax, 3
sub eax, esi
lea eax, [ecx + eax*4]
lea ecx, [esp + 0x14]
lea edx, [eax + 0x10c]
add eax, 4
push edx
push eax
mov eax, dword [esp + 0x18]
push eax
push 0x40d540
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x2c]
add esp, 0x14
push edx
jmp 0x404158
mov ecx, esi
mov edx, dword [esp + 0x25c]
shl ecx, 5
add ecx, esi
lea eax, [esp + 0x44]
shl ecx, 3
sub ecx, esi
push eax
lea eax, [edx + ecx*4 + 0x210]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x20]
push 0x40d540
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x2c]
add esp, 0x14
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], 0
lea ecx, [esp + 0x10]
mov byte [esp + 0x254], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x254], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov dword [esp + 0x254], 0xffffffff
call fcn.00407250
mov eax, dword [esp + 0x1c]
pop ebp
mov ecx, dword [esp + 0x248]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x248
ret 0xc