Function at 0x40cc9c
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa98
mov eax, 0x48f3d8
push ebx
push esi
push edi
call fcn.004696b8
lea edx, [ebp - 0x40]
push edx
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040b594
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x40cd09
mov word [ebp - 0x2c], 8
mov edx, 0x48c233
lea eax, [ebp - 4]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00474d44
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x40d19b
push ebx
call sub.KERNEL32.DLL_lstrlenA
dec eax
jle 0x40cd2d
push ebx
call sub.KERNEL32.DLL_lstrlenA
movsx ecx, byte [ebx + eax - 1]
cmp ecx, 0x5c
jne 0x40cd2d
push ebx
call sub.KERNEL32.DLL_lstrlenA
mov byte [ebx + eax - 1], 0
xor edi, edi
xor eax, eax
mov dword [ebp - 0x48], eax
test ebx, ebx
je 0x40ce6e
push 0x48c24d
push ebx
call fcn.0040b39c
add esp, 8
mov esi, eax
lea eax, [ebp - 0x44]
push eax
push 0x1020019
push 0
push ebx
mov edx, dword [ebp - 0x40]
push edx
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
je 0x40ce09
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000002
je 0x40cdb2
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000003
je 0x40cdb2
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000000
je 0x40cdb2
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000001
je 0x40cdb2
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000005
je 0x40cdb2
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000006
je 0x40cdb2
mov ecx, dword [ebp - 0x40]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
push ebx
push 0x48c24f
lea eax, [ebp - 0x454]
push eax
call sub.USER32.DLL_wsprintfA
mov word [ebp - 0x2c], 0x14
add esp, 0xc
lea edx, [ebp - 0x454]
lea eax, [ebp - 8]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00474d44
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x40d19b
test esi, esi
je 0x40ce58
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000002
je 0x40ce5e
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000003
je 0x40ce5e
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000000
je 0x40ce5e
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000001
je 0x40ce5e
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000005
je 0x40ce5e
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000006
je 0x40ce5e
mov ecx, dword [ebp - 0x40]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
jmp 0x40ce5e
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x48], ebx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
mov ebx, esi
test ebx, ebx
jne 0x40cd3c
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp - 0x48]
push edx
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x40cf22
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000002
je 0x40cecc
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000003
je 0x40cecc
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000000
je 0x40cecc
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x80000001
je 0x40cecc
mov eax, dword [ebp - 0x40]
cmp eax, 0x80000005
je 0x40cecc
mov edx, dword [ebp - 0x40]
cmp edx, 0x80000006
je 0x40cecc
mov ecx, dword [ebp - 0x40]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
push 0x48c265
lea eax, [ebp - 0x454]
push eax
call sub.USER32.DLL_wsprintfA
mov word [ebp - 0x2c], 0x20
add esp, 8
lea edx, [ebp - 0x454]
lea eax, [ebp - 0xc]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00474d44
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x40d19b
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x4c]
push 0
push edx
push 0
xor ebx, ebx
mov ecx, dword [ebp - 0x40]
xor esi, esi
push ecx
call sub.ADVAPI32.DLL_RegQueryInfoKeyA
mov eax, dword [ebp - 0x4c]
test eax, eax
jbe 0x40cf86
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00468dd0
pop ecx
mov esi, eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x4c]
push eax
push esi
mov edx, dword [ebp - 0x40]
push edx
call sub.ADVAPI32.DLL_RegQueryInfoKeyA
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x40cfac
mov eax, dword [ebp - 0x50]
push eax
call fcn.00468dd0
mov ebx, eax
lea eax, [ebp - 0x50]
pop ecx
push eax
push ebx
push 0xf
mov edx, dword [ebp - 0x40]
push edx
call dword [0x49a8d8]
jmp 0x40cfb1
xor ecx, ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x460], 0xc
mov dword [ebp - 0x45c], ebx
xor eax, eax
mov dword [ebp - 0x458], eax
push 0
lea edx, [ebp - 0x54]
push edx
lea ecx, [ebp - 0x460]
push ecx
push 0x10f003f
push 0
push esi
push 0
mov eax, dword [ebp + 0x10]
push eax
push edi
call sub.ADVAPI32.DLL_RegCreateKeyExA
test eax, eax
je 0x40d069
test esi, esi
je 0x40cff9
push esi
call fcn.00468de0
pop ecx
test ebx, ebx
je 0x40d004
push ebx
call fcn.00468de0
pop ecx
push edi
call sub.ADVAPI32.DLL_RegCloseKey
mov edx, dword [ebp - 0x40]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
push 0x48c27f
lea ecx, [ebp - 0x454]
push ecx
call sub.USER32.DLL_wsprintfA
mov word [ebp - 0x2c], 0x2c
add esp, 8
lea edx, [ebp - 0x454]
lea eax, [ebp - 0x10]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00474d44
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x40d19b
test esi, esi
je 0x40d074
push esi
call fcn.00468de0
pop ecx
test ebx, ebx
je 0x40d07f
push ebx
call fcn.00468de0
pop ecx
mov ecx, dword [ebp - 0x54]
push ecx
mov eax, dword [ebp - 0x40]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.0040ca10
add esp, 0xc
inc eax
jne 0x40d104
mov ecx, dword [ebp - 0x54]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
push edi
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, dword [ebp - 0x40]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
push 0x48c28d
lea edx, [ebp - 0x454]
push edx
call sub.USER32.DLL_wsprintfA
mov word [ebp - 0x2c], 0x38
add esp, 8
lea edx, [ebp - 0x454]
lea eax, [ebp - 0x14]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00474d44
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x40d19b
lea ecx, [ebp - 0x568]
push ecx
mov eax, dword [ebp - 0x48]
push eax
push edi
call fcn.0040c3f4
add esp, 0xc
inc eax
jne 0x40d178
mov edx, dword [ebp - 0x54]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
push edi
call sub.ADVAPI32.DLL_RegCloseKey
mov ecx, dword [ebp - 0x40]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
push 0x48c29b
lea eax, [ebp - 0x454]
push eax
call sub.USER32.DLL_wsprintfA
mov word [ebp - 0x2c], 0x44
add esp, 8
lea edx, [ebp - 0x454]
lea eax, [ebp - 0x18]
call fcn.00474b48
inc dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp + 0x14]
call fcn.004578d8
dec dword [ebp - 0x20]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00474d44
mov ecx, dword [ebp - 0x54]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, dword [ebp - 0x40]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
push edi
call sub.ADVAPI32.DLL_RegCloseKey
xor eax, eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret