Function at 0x40a069
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2120
call fcn.004228b0
mov eax, dword [0x44c5a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2120], eax
push esi
mov esi, dword [ebp + 0xc]
xor eax, eax
push edi
mov dword [ebp - 0x210c], eax
lea eax, [ebp - 0x2004]
mov edi, ecx
push eax
mov dword [ebp - 0x211c], edi
mov dword [ebp - 0x2110], ebx
mov dword [ebp - 0x2114], esi
call fcn.0040af7c
test eax, eax
js 0x40a37e
lea eax, [ebp - 0x210c]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.0040c4e4
pop ecx
pop ecx
test eax, eax
jne 0x40a0e5
mov eax, 0x80020009
jmp 0x40a37e
mov ecx, edi
call fcn.0040bf81
lea eax, [ebp - 0x2004]
push eax
mov ecx, edi
call fcn.0040af7c
test eax, eax
js 0x40a37e
movzx eax, word [ebp - 0x210c]
sub eax, 8
je 0x40a342
sub eax, 9
je 0x40a235
dec eax
dec eax
je 0x40a1f7
sub eax, 0x3ff5
jne 0x40a368
lea ecx, [ebp - 0x2004]
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40a139
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x2108], esi
lea eax, [ecx + 2]
push eax
lea ecx, [ebp - 0x2108]
call fcn.0040a3be
mov esi, dword [ebp - 0x2108]
test esi, esi
je 0x40a1d6
cmp word [ebp - 0x2004], 0
lea edi, [ebp - 0x2004]
je 0x40a1b5
xor ebx, ebx
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x40a1a1
cmp word [eax], 0x30
jne 0x40a1a1
xor ecx, ecx
mov word [esi], cx
push eax
add esi, 2
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x40a1aa
mov word [esi], cx
add esi, 2
add edi, 2
cmp word [edi], bx
jne 0x40a179
mov ebx, dword [ebp - 0x2110]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x2108]
mov ecx, ebx
push dword [ebp - 0x2114]
call fcn.0040be77
mov esi, dword [ebp - 0x2108]
mov edi, eax
jmp 0x40a1d9
push 0xe
pop edi
lea eax, [ebp - 0x2104]
cmp esi, eax
je 0x40a355
lea ecx, [ebp - 0x2108]
call fcn.0040aa26
jmp 0x40a355
lea eax, [ebp - 0x2110]
push eax
xor edi, edi
push edi
push edi
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x2110]
push 4
mov dword [ebp - 0x2114], eax
lea eax, [ebp - 0x2114]
push eax
push 4
push edi
push esi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x40a353
lea ebx, [ebp - 0x2004]
xor edi, edi
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
cmp ax, di
jne 0x40a240
sub ebx, ecx
sar ebx, 1
test bl, 1
je 0x40a25e
mov eax, 0x80004005
jmp 0x40a37e
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
lea ecx, [ebp - 0x2108]
mov dword [ebp - 0x2118], esi
mov dword [ebp - 0x2108], edi
call fcn.0040a38f
cmp dword [ebp - 0x2108], edi
jne 0x40a29e
lea eax, [ebp - 0x2104]
test eax, eax
je 0x40a254
lea ecx, [ebp - 0x2108]
call fcn.0040aa26
jmp 0x40a254
push esi
push edi
push dword [ebp - 0x2108]
call fcn.00422240
add esp, 0xc
mov ecx, edi
mov dword [ebp - 0x210c], ecx
test ebx, ebx
jle 0x40a307
mov esi, dword [ebp - 0x2108]
mov eax, ecx
movzx ecx, word [ebp + ecx*2 - 0x2004]
cdq
sub eax, edx
mov edi, eax
push ecx
sar edi, 1
call fcn.0040a640
mov edx, dword [ebp - 0x210c]
pop ecx
and edx, 1
shl edx, 2
push 4
pop ecx
sub ecx, edx
shl al, cl
mov ecx, dword [ebp - 0x210c]
or byte [edi + esi], al
inc ecx
mov dword [ebp - 0x210c], ecx
cmp ecx, ebx
jl 0x40a2ba
mov esi, dword [ebp - 0x2118]
xor edi, edi
mov eax, dword [ebp - 0x2110]
push esi
push dword [ebp - 0x2108]
push 3
push edi
push dword [ebp - 0x2114]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x2104]
cmp dword [ebp - 0x2108], eax
je 0x40a355
lea ecx, [ebp - 0x2108]
call fcn.0040aa26
jmp 0x40a355
push 1
lea eax, [ebp - 0x2004]
push eax
push esi
mov ecx, ebx
call fcn.0040bed3
mov edi, eax
test edi, edi
je 0x40a362
push edi
call fcn.0040a5de
pop ecx
jmp 0x40a37e
mov edi, dword [ebp - 0x211c]
push dword [ebp - 0x2120]
mov ecx, edi
call fcn.0040af7c
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00421734
leave
ret 0xc