Function at 0x406620
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 0x406884
mov eax, dword [0x44a3d4]
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.0043a20a
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 + 0x3b38]
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 0x4067bc
lea ecx, [esp + 0x10]
push 0xa
push ecx
push ebp
mov dword [esp + 0x2c], ebp
call fcn.0043a20a
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 0x406796
mov eax, dword [esp + 0x1c]
lea esi, [eax + 0x3b38]
lea eax, [esp + 0x178]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406733
test cl, cl
je 0x40672f
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406733
add eax, 2
add esi, 2
test cl, cl
jne 0x40670f
xor eax, eax
jmp 0x406738
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406796
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 0x4066b9
jmp 0x4067bc
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 0x40685b
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, 0x44a130
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 + 0x3b2c]
call fcn.0041fee0
jmp 0x40685f
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi + 0x3b38]
push str.SoftwareORLVNCviewerHistory
push eax
lea ecx, [esi + 0x3b2c]
call fcn.0041fbc0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x268