Function at 0x40ec60
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x211c
call fcn.004125f0
mov eax, dword [0x4297c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
lea ecx, [ebp - 0x2004]
push ecx
mov ecx, edi
mov dword [ebp - 0x2118], edi
mov dword [ebp - 0x2114], ebx
mov dword [ebp - 0x210c], esi
mov dword [ebp - 0x211c], eax
mov dword [ebp - 0x2110], 0
call fcn.0040dcc0
test eax, eax
jl 0x40efa3
lea edx, [ebp - 0x2110]
push edx
lea eax, [ebp - 0x2004]
push eax
call fcn.0040dae0
add esp, 8
test eax, eax
jne 0x40ecef
pop edi
pop esi
mov eax, 0x80020009
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004125d9
mov esp, ebp
pop ebp
ret 0xc
mov ecx, edi
call fcn.0040dc60
lea ecx, [ebp - 0x2004]
push ecx
mov ecx, edi
call fcn.0040dcc0
test eax, eax
jl 0x40efa3
movzx eax, word [ebp - 0x2110]
cmp eax, 0x13
jg 0x40eeab
je 0x40ee6b
cmp eax, 8
je 0x40ee56
cmp eax, 0x11
jne 0x40ef8b
lea edx, [ebp - 0x2004]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test bl, 1
jne 0x40ed88
cdq
sub eax, edx
mov edi, eax
sar edi, 1
xor esi, esi
push edi
lea ecx, [ebp - 0x2108]
mov dword [ebp - 0x2110], edi
mov dword [ebp - 0x2108], esi
call fcn.0040e7e0
mov eax, dword [ebp - 0x2108]
cmp eax, esi
jne 0x40eda0
lea eax, [ebp - 0x2104]
test eax, eax
je 0x40ed88
lea ecx, [ebp - 0x2108]
call fcn.0040a1f0
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004125d9
mov esp, ebp
pop ebp
ret 0xc
push edi
push esi
push eax
call fcn.004123b0
add esp, 0xc
cmp ebx, esi
jle 0x40edef
nop
movzx eax, word [ebp + esi*2 - 0x2004]
mov edx, dword [ebp - 0x2108]
mov ecx, esi
shr ecx, 1
push eax
lea edi, [ecx + edx]
call fcn.0040db90
mov ecx, esi
and ecx, 1
add ecx, ecx
add ecx, ecx
mov edx, ecx
mov ecx, 4
sub ecx, edx
shl al, cl
inc esi
add esp, 4
or byte [edi], al
cmp esi, ebx
jl 0x40edb0
mov edi, dword [ebp - 0x2110]
mov ecx, dword [ebp - 0x2108]
mov edx, dword [ebp - 0x210c]
mov eax, dword [ebp - 0x2114]
mov eax, dword [eax]
push edi
push ecx
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
lea eax, [ebp - 0x2104]
cmp dword [ebp - 0x2108], eax
je 0x40ee2c
lea ecx, [ebp - 0x2108]
call fcn.0040a1f0
mov edi, dword [ebp - 0x2118]
test esi, esi
je 0x40ef8b
push esi
call fcn.0040d7e0
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004125d9
mov esp, ebp
pop ebp
ret 0xc
push 1
lea ecx, [ebp - 0x2004]
push ecx
push esi
mov ecx, ebx
call fcn.0040d920
mov esi, eax
jmp 0x40ee32
lea edx, [ebp - 0x210c]
push edx
push 0
push 0
lea eax, [ebp - 0x2004]
push eax
mov dword [ebp - 0x2114], 0
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov ecx, dword [ebp - 0x210c]
push ecx
push esi
mov ecx, ebx
call fcn.0040d900
lea ecx, [ebp - 0x2114]
mov esi, eax
call fcn.0040df40
jmp 0x40ee32
cmp eax, 0x4008
jne 0x40ef8b
lea edx, [ebp - 0x2004]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 2
push eax
lea ecx, [ebp - 0x2108]
mov dword [ebp - 0x2108], 0
call fcn.0040e790
mov eax, dword [ebp - 0x2108]
test eax, eax
je 0x40ef68
cmp word [ebp - 0x2004], 0
mov edi, eax
lea esi, [ebp - 0x2004]
je 0x40ef38
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
push esi
call ebx
movzx ecx, word [esi]
cmp cx, 0x5c
jne 0x40ef23
cmp word [eax], 0x30
jne 0x40ef23
xor ecx, ecx
mov word [edi], cx
push eax
add edi, 2
call ebx
mov esi, eax
jmp 0x40ef2c
mov word [edi], cx
add edi, 2
add esi, 2
cmp word [esi], 0
jne 0x40ef02
mov ebx, dword [ebp - 0x2114]
xor edx, edx
mov word [edi], dx
mov edx, dword [ebp - 0x210c]
xor eax, eax
mov word [edi + 2], ax
mov ecx, dword [ebp - 0x2108]
push ecx
push edx
mov ecx, ebx
call fcn.0040d960
mov edi, dword [ebp - 0x2118]
mov esi, eax
mov eax, dword [ebp - 0x2108]
jmp 0x40ef6d
mov esi, 0xe
lea ecx, [ebp - 0x2104]
cmp eax, ecx
je 0x40ee32
lea ecx, [ebp - 0x2108]
call fcn.0040a1f0
jmp 0x40ee32
mov edx, dword [ebp - 0x211c]
push edx
mov ecx, edi
call fcn.0040dcc0
xor ecx, ecx
test eax, eax
setge cl
dec ecx
and eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004125d9
mov esp, ebp
pop ebp
ret 0xc