Function at 0x4066b0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x268
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
mov al, byte [esi + 0x16c]
test al, al
jne 0x406914
mov eax, dword [0x44a4a4]
push ebx
push ebp
push edi
mov dword [esp + 0x18], 0xff
mov ebx, dword [eax + 0x114]
lea ecx, [esp + 0x28]
push 0xa
push ecx
push ebx
call fcn.0043a8ca
add esp, 0xc
lea edx, [esp + 0x24]
lea eax, [esp + 0x14]
push edx
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareORLVNCviewerHistory
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea edi, [esi + 0x3e50]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xor ebp, ebp
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
jle 0x40684c
lea ecx, [esp + 0x10]
push 0xa
push ecx
push ebp
mov dword [esp + 0x2c], ebp
call fcn.0043a8ca
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0x178]
lea ecx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
push eax
push 0
push 0
push ecx
push edx
mov dword [esp + 0x30], 0xff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406826
mov eax, dword [esp + 0x1c]
lea esi, [eax + 0x3e50]
lea eax, [esp + 0x178]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4067c3
test cl, cl
je 0x4067bf
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4067c3
add eax, 2
add esi, 2
test cl, cl
jne 0x40679f
xor eax, eax
jmp 0x4067c8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406826
lea edi, [esp + 0x78]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x78]
push ecx
push eax
push 1
lea ecx, [esp + 0x1c]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edi, [esp + 0x178]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebp
cmp ebp, ebx
rep movsb byte es:[edi], byte [esi]
jl 0x406749
jmp 0x40684c
lea edi, [esp + 0x78]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x7c]
push ecx
push 1
push eax
mov eax, dword [esp + 0x24]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp dword [esp + 0x20], ebx
jne 0x4068eb
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x18], 0xff
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x178]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x44a200
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x178]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x178]
push str.SoftwareORLVNCviewerHistory
push edx
lea ecx, [esi + 0x3e44]
call fcn.00420450
jmp 0x4068ef
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi + 0x3e50]
push str.SoftwareORLVNCviewerHistory
push eax
lea ecx, [esi + 0x3e44]
call fcn.004201b0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x268
ret