Function at 0x406680
Capabilities:
Set registry value

Disassembly:
mov eax, 0x210c
call fcn.0041e670
push ebx
push ebp
lea eax, [esp + 0x114]
mov ebp, ecx
xor ebx, ebx
push eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ebx
call fcn.00406d83
test eax, eax
js 0x4069c6
lea edx, [esp + 8]
lea ecx, [esp + 0x114]
call fcn.00406591
test eax, eax
jne 0x4066cb
mov eax, 0x80020009
jmp 0x4069c6
mov ecx, ebp
call fcn.00407422
lea eax, [esp + 0x114]
push eax
mov ecx, ebp
call fcn.00406d83
test eax, eax
js 0x4069c6
movzx eax, word [esp + 8]
push esi
push edi
sub eax, 8
je 0x40695c
sub eax, 9
je 0x40682a
dec eax
dec eax
je 0x4067ff
sub eax, 0x3ff5
jne 0x4069ad
lea ecx, [esp + 0x11c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40671f
sub ecx, edx
sar ecx, 1
add ecx, 2
xor eax, eax
shld eax, ecx, 1
add ecx, ecx
mov dword [esp + 0x18], ebx
cmp eax, ebx
ja 0x4069d1
cmp ecx, 0xffffffff
ja 0x4069d1
cmp ecx, 0x100
jbe 0x406766
push ecx
lea ecx, [esp + 0x1c]
call fcn.00406095
mov esi, dword [esp + 0x18]
jmp 0x40676e
lea esi, [esp + 0x1c]
mov dword [esp + 0x18], esi
test esi, esi
je 0x4067e2
lea edi, [esp + 0x11c]
cmp word [esp + 0x11c], bx
je 0x4067bf
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
push 0x30
pop ebp
push edi
call ebx
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x4067ab
cmp word [eax], bp
jne 0x4067ab
xor ecx, ecx
mov word [esi], cx
push eax
add esi, 2
call ebx
mov edi, eax
jmp 0x4067b4
mov word [esi], cx
add esi, 2
add edi, 2
xor eax, eax
cmp word [edi], ax
jne 0x40678c
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x2120]
xor eax, eax
mov dword [esi], eax
push dword [esp + 0x18]
push dword [esp + 0x2128]
call fcn.00406627
mov esi, dword [esp + 0x18]
mov edi, eax
jmp 0x4067e5
push 0xe
pop edi
lea eax, [esp + 0x1c]
cmp esi, eax
je 0x4069a0
lea ecx, [esp + 0x18]
call fcn.0040608c
jmp 0x4069a0
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
push 4
lea eax, [esp + 0x14]
push eax
push 4
jmp 0x406987
lea ebx, [esp + 0x11c]
xor edx, edx
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
cmp ax, dx
jne 0x406836
sub ebx, ecx
sar ebx, 1
test bl, 1
jne 0x4068a1
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
xor ecx, ecx
sar esi, 1
mov dword [esp + 0x18], ecx
cmp ecx, ecx
ja 0x4069d1
cmp esi, 0xffffffff
ja 0x4069d1
cmp esi, 0x100
jbe 0x406884
push esi
lea ecx, [esp + 0x1c]
call fcn.00406095
mov eax, dword [esp + 0x18]
xor ecx, ecx
jmp 0x40688c
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4068ab
lea eax, [esp + 0x1c]
test eax, eax
je 0x4068a1
lea ecx, [esp + 0x18]
call fcn.0040608c
mov eax, 0x80004005
jmp 0x4069c4
push esi
push ecx
push eax
call fcn.004127c0
xor ecx, ecx
add esp, 0xc
mov edi, ecx
test ebx, ebx
jle 0x406927
push 0x30
pop ebp
mov eax, edi
cdq
sub eax, edx
movzx edx, word [esp + edi*2 + 0x11c]
sar eax, 1
add eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, edx
cmp eax, ebp
jl 0x406904
cmp eax, 0x39
jle 0x4068ff
cmp eax, 0x40
jle 0x406904
cmp eax, 0x46
jle 0x4068fa
add eax, 0xffffff9f
cmp eax, 5
ja 0x406904
sub dl, 0x57
jmp 0x406906
sub dl, 0x37
jmp 0x406906
sub dl, 0x30
jmp 0x406906
mov dl, cl
mov eax, edi
and eax, 1
push 4
shl eax, 2
pop ecx
sub ecx, eax
mov eax, dword [esp + 0x10]
shl dl, cl
push 0
pop ecx
or byte [eax], dl
inc edi
cmp edi, ebx
jl 0x4068c1
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x2120]
push esi
push dword [esp + 0x1c]
push 3
push ecx
push dword [esp + 0x2134]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [esp + 0x1c]
cmp dword [esp + 0x18], eax
je 0x4069a0
lea ecx, [esp + 0x18]
call fcn.0040608c
jmp 0x4069a0
lea ecx, [esp + 0x11c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x406966
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esp + 0x120]
push eax
push 1
mov eax, dword [esp + 0x212c]
push ebx
push dword [esp + 0x2134]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x4069ad
mov ecx, edi
call fcn.00406d75
jmp 0x4069c4
push dword [esp + 0x2128]
mov ecx, ebp
call fcn.00406d83
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210c
ret 0xc
push 0x80070216
call fcn.004069dc
int3