Function at 0x406651
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x2108]
mov eax, 0x2108
call fcn.0045c0d0
push 0xffffffffffffffff
push 0x46bdba
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x498fa4]
xor eax, ebp
mov dword [ebp + 0x2104], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x2110]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x2114]
mov esi, ecx
mov edi, edx
mov dword [ebp - 0x28], eax
xor ebx, ebx
lea eax, [ebp + 0x104]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
call fcn.00406c9c
cmp eax, ebx
jl 0x406974
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x104]
push eax
call fcn.00406511
pop ecx
pop ecx
test eax, eax
jne 0x4066e5
mov eax, 0x80020009
jmp 0x406974
call fcn.00407467
lea eax, [ebp + 0x104]
mov ecx, esi
call fcn.00406c9c
cmp eax, ebx
jl 0x406974
movzx eax, word [ebp - 0x14]
sub eax, 8
je 0x40692d
sub eax, 9
je 0x406816
dec eax
dec eax
je 0x4067f0
sub eax, 0x3ff5
jne 0x406963
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
inc eax
mov dword [ebp], ebx
push 2
mov dword [ebp - 4], ebx
push eax
mov byte [ebp - 4], 1
call fcn.0040662c
pop ecx
pop ecx
cmp eax, 0x100
jbe 0x40675e
push eax
lea eax, [ebp]
push eax
call fcn.004060c5
jmp 0x40676e
lea eax, [ebp + 4]
mov dword [ebp], eax
jmp 0x40676e
mov esi, dword [ebp]
cmp esi, ebx
je 0x4067d4
lea edi, [ebp + 0x104]
cmp word [ebp + 0x104], bx
je 0x4067b9
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
push edi
call ebx
movzx ecx, word [edi]
cmp cx, 0x5c
jne 0x4067aa
cmp word [eax], 0x30
jne 0x4067aa
xor ecx, ecx
mov word [esi], cx
inc esi
push eax
inc esi
call ebx
mov edi, eax
jmp 0x4067b1
mov word [esi], cx
inc esi
inc esi
inc edi
inc edi
cmp word [edi], 0
jne 0x40678a
xor ebx, ebx
xor eax, eax
mov word [esi], ax
mov word [esi + 2], ax
push dword [ebp]
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
call fcn.004065a5
mov esi, eax
jmp 0x4067d7
push 0xe
pop esi
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x406956
lea eax, [ebp]
call fcn.004060bc
jmp 0x406956
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
push 4
lea eax, [ebp - 0x14]
push eax
push 4
jmp 0x406948
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x14], eax
test al, 1
je 0x406834
mov eax, 0x80004005
jmp 0x406974
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x24], edi
mov dword [ebp], ebx
push 1
mov dword [ebp - 4], 3
push edi
mov byte [ebp - 4], 4
call fcn.0040662c
pop ecx
pop ecx
cmp eax, 0x100
jbe 0x406869
push eax
lea eax, [ebp]
push eax
call fcn.004060c5
jmp 0x40687c
lea eax, [ebp + 4]
mov dword [ebp], eax
jmp 0x40687c
cmp dword [ebp], ebx
jne 0x406892
lea eax, [ebp + 4]
test eax, eax
je 0x40682a
lea eax, [ebp]
call fcn.004060bc
jmp 0x40682a
push edi
push ebx
push dword [ebp]
call fcn.00458750
add esp, 0xc
xor esi, esi
cmp dword [ebp - 0x14], ebx
jle 0x406903
movzx ecx, word [ebp + esi*2 + 0x104]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
add eax, dword [ebp]
movzx edx, cx
cmp edx, 0x30
jl 0x4068e8
cmp edx, 0x39
jle 0x4068e1
cmp edx, 0x40
jle 0x4068e8
cmp edx, 0x46
jle 0x4068dc
add edx, 0xffffff9f
cmp edx, 5
ja 0x4068e8
sub cl, 0x57
jmp 0x4068e4
sub cl, 0x37
jmp 0x4068e4
sub cl, 0x30
mov dl, cl
jmp 0x4068ea
xor dl, dl
mov ebx, esi
and ebx, 1
shl ebx, 2
push 4
pop ecx
sub ecx, ebx
shl dl, cl
or byte [eax], dl
inc esi
cmp esi, dword [ebp - 0x14]
jl 0x4068a6
xor ebx, ebx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
push edi
push dword [ebp]
push 3
push ebx
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x406956
lea eax, [ebp]
call fcn.004060bc
jmp 0x406956
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0x104]
push eax
push 1
push ebx
push dword [ebp - 0x1c]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp esi, ebx
je 0x406963
mov eax, esi
call fcn.00406c6d
jmp 0x406974
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
call fcn.00406c9c
cmp eax, ebx
jl 0x406974
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2104]
xor ecx, ebp
call fcn.00457fc4
add ebp, 0x2108
leave
ret 8