Function at 0x406db6
Capabilities:
Set registry value

Disassembly:
mov eax, 0x52a4d7
call fcn.004c9d2c
push ecx
mov eax, 0x2218
call fcn.004c9d90
push ebx
push esi
push edi
lea eax, [ebp - 0x2228]
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ebx
call fcn.0040a2db
test eax, eax
js 0x4070b4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2228]
push eax
call fcn.00410de8
pop ecx
pop ecx
test eax, eax
jne 0x406e0f
mov eax, 0x80020009
jmp 0x4070b4
mov ecx, esi
call fcn.0040fc24
lea eax, [ebp - 0x2228]
mov ecx, esi
push eax
call fcn.0040a2db
test eax, eax
js 0x4070b4
movzx eax, word [ebp - 0x14]
sub eax, 8
je 0x407088
sub eax, 9
je 0x406f71
dec eax
sub eax, 1
je 0x406f44
sub eax, 0x3ff5
jne 0x4070a1
lea eax, [ebp - 0x2228]
push eax
call fcn.004dc7c2
add eax, 2
mov dword [ebp - 0x228], ebx
push 2
mov dword [ebp - 4], ebx
push eax
mov byte [ebp - 4], 1
call fcn.00401c13
add esp, 0xc
cmp eax, 0x100
jbe 0x406e93
push eax
lea ecx, [ebp - 0x228]
call fcn.00407263
jmp 0x406ea9
lea esi, [ebp - 0x224]
mov dword [ebp - 0x228], esi
jmp 0x406eaf
mov esi, dword [ebp - 0x228]
test esi, esi
je 0x406f15
cmp word [ebp - 0x2228], 0
lea edi, [ebp - 0x2228]
je 0x406ef6
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x406ee8
cmp word [eax], 0x30
jne 0x406ee8
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x406eee
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x406ec3
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x228]
push dword [ebp + 0xc]
call fcn.0040faec
mov esi, dword [ebp - 0x228]
mov edi, eax
jmp 0x406f18
push 0xe
pop edi
lea eax, [ebp - 0x224]
cmp esi, eax
je 0x406f2d
lea ecx, [ebp - 0x228]
call fcn.004095bc
mov esi, dword [ebp - 0x18]
test edi, edi
je 0x4070a1
push edi
call fcn.00407682
pop ecx
jmp 0x4070b4
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
lea eax, [ebp - 0x2228]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
test eax, eax
js 0x4070b4
push dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.0040fa08
mov edi, eax
jmp 0x406f30
lea eax, [ebp - 0x2228]
push eax
call fcn.004dc7c2
mov dword [ebp - 0x20], eax
pop ecx
test al, 1
jne 0x406fed
cdq
sub eax, edx
mov dword [ebp - 0x124], ebx
mov esi, eax
sar esi, 1
mov dword [ebp - 0x1c], esi
push 1
mov dword [ebp - 4], 3
push esi
mov byte [ebp - 4], 4
call fcn.00401c13
pop ecx
pop ecx
cmp eax, 0x100
jbe 0x406fbf
push eax
lea ecx, [ebp - 0x124]
call fcn.00407241
jmp 0x406fd8
lea eax, [ebp - 0x120]
mov dword [ebp - 0x124], eax
jmp 0x406fde
mov eax, dword [ebp - 0x124]
test eax, eax
jne 0x406ff7
lea ecx, [ebp - 0x124]
call fcn.004095b3
mov eax, 0x80004005
jmp 0x4070b4
push esi
push ebx
push eax
call fcn.004cf050
add esp, 0xc
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x20], 0
mov eax, ebx
jle 0x40704c
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x124]
mov edi, eax
movzx eax, word [ebp + eax*2 - 0x2228]
push eax
shr edi, 1
call fcn.00407a64
mov edx, dword [ebp - 0x14]
pop ecx
and edx, 1
shl edx, 2
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [edi + esi], al
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, ebx
jl 0x407010
mov esi, dword [ebp - 0x1c]
xor ebx, ebx
mov eax, dword [ebp + 8]
push esi
push dword [ebp - 0x124]
push 3
push ebx
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x120]
cmp dword [ebp - 0x124], eax
je 0x406f2d
lea ecx, [ebp - 0x124]
call fcn.004095b3
jmp 0x406f2d
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2228]
push 1
push eax
push dword [ebp + 0xc]
call fcn.0040fb66
jmp 0x406f6d
push dword [ebp + 0x10]
mov ecx, esi
call fcn.0040a2db
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc