Function at 0x406985
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x278
mov eax, 0x5b533b
call fcn.00580ed4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x24c], ebx
mov esi, ecx
xor eax, eax
mov dword [ebp - 0x248], esi
mov edi, edx
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], ebx
mov word [ebp - 0x230], ax
mov dword [ebp - 4], 1
call fcn.00408184
mov esi, str.CLSID_
push esi
lea eax, [ebp - 0x234]
push eax
mov dword [ebp - 0x24c], 1
call fcn.00408208
cmp dword [edi + 0x18], 8
jb 0x4069fe
mov eax, dword [edi + 4]
jmp 0x406a01
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00408208
push 0x670fe8
lea eax, [ebp - 0x234]
push eax
call fcn.00408208
mov eax, dword [ebp - 0x240]
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x234]
call fcn.004097f9
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x244], 0x104
mov dword [ebp - 0x238], ebx
jae 0x406a58
lea eax, [ebp - 0x230]
lea ecx, [ebp - 0x23c]
push ecx
push 0x20019
push ebx
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406b3e
push dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esi, [ebp - 0x240]
push dword [ebp - 0x23c]
call fcn.0040e3e6
mov byte [ebp - 4], 2
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x238]
push eax
push ebx
push ebx
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406c65
cmp dword [ebp - 0x238], 1
je 0x406ad5
cmp dword [ebp - 0x238], 2
jne 0x406c65
mov eax, dword [ebp - 0x244]
shr eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea esi, [ebp - 0x268]
call fcn.00408197
mov byte [ebp - 4], 3
cmp dword [eax + 0x18], 8
jb 0x406aff
mov eax, dword [eax + 4]
jmp 0x406b02
add eax, 4
push eax
lea edi, [ebp - 0x284]
call fcn.00404c17
pop ecx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x248]
push 0xffffffffffffffff
push ebx
call fcn.00409936
mov byte [ebp - 4], 3
push ebx
push 1
mov esi, edi
call fcn.00409c0f
mov byte [ebp - 4], 2
lea esi, [ebp - 0x268]
jmp 0x406c5d
push 6
pop eax
mov ecx, esi
lea edx, [ebp - 0x234]
call fcn.004099c2
push 0xffffffffffffffff
push ebx
mov eax, edi
lea ecx, [ebp - 0x234]
call fcn.004097f9
push 0x67236c
lea eax, [ebp - 0x234]
push eax
call fcn.00408208
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x406b84
lea eax, [ebp - 0x230]
lea ecx, [ebp - 0x23c]
push ecx
push 0x20019
push ebx
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406c7e
push dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esi, [ebp - 0x240]
push dword [ebp - 0x23c]
call fcn.0040e3e6
mov byte [ebp - 4], 5
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x238]
push eax
push ebx
push ebx
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406c65
cmp dword [ebp - 0x238], 1
je 0x406bf9
cmp dword [ebp - 0x238], 2
jne 0x406c65
mov eax, dword [ebp - 0x244]
shr eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea esi, [ebp - 0x284]
call fcn.00408197
mov byte [ebp - 4], 6
cmp dword [eax + 0x18], 8
jb 0x406c23
mov eax, dword [eax + 4]
jmp 0x406c26
add eax, 4
push eax
lea edi, [ebp - 0x268]
call fcn.00404c17
pop ecx
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x248]
push 0xffffffffffffffff
push ebx
call fcn.00409936
mov byte [ebp - 4], 6
push ebx
push 1
mov esi, edi
call fcn.00409c0f
mov byte [ebp - 4], 5
lea esi, [ebp - 0x284]
push ebx
push 1
call fcn.00409c0f
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x240]
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], bl
push ebx
push 1
lea esi, [ebp - 0x234]
call fcn.00409c0f
mov eax, dword [ebp - 0x248]
call fcn.00580f57
ret