Function at 0x5217a5
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2114
call fcn.00542080
push ebx
push esi
lea eax, [ebp - 0x2114]
mov ebx, ecx
xor esi, esi
mov dword [ebp - 8], ebx
push eax
mov dword [ebp - 4], esi
call fcn.0052205f
test eax, eax
js 0x521a44
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2114]
push eax
call fcn.00523454
pop ecx
pop ecx
test eax, eax
jne 0x5217f2
mov eax, 0x80020009
jmp 0x521a44
mov ecx, ebx
call fcn.00522f95
lea eax, [ebp - 0x2114]
mov ecx, ebx
push eax
call fcn.0052205f
test eax, eax
js 0x521a44
movzx eax, word [ebp - 4]
push edi
sub eax, 8
je 0x521a17
sub eax, 9
je 0x52192e
dec eax
sub eax, 1
je 0x5218ef
sub eax, 0x3ff5
jne 0x521a30
lea eax, [ebp - 0x2114]
push eax
call fcn.00553a47
pop ecx
add eax, 2
mov dword [ebp - 0x114], esi
push eax
lea ecx, [ebp - 0x114]
call fcn.00521a79
mov esi, dword [ebp - 0x114]
test esi, esi
je 0x5218ce
cmp word [ebp - 0x2114], 0
lea edi, [ebp - 0x2114]
je 0x5218af
xor ebx, ebx
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x52189e
cmp word [eax], 0x30
jne 0x52189e
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x5218a4
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x521879
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x114]
push dword [ebp + 0xc]
call fcn.00522efc
mov esi, dword [ebp - 0x114]
mov edi, eax
jmp 0x5218d1
push 0xe
pop edi
lea eax, [ebp - 0x110]
cmp esi, eax
je 0x521a0a
lea ecx, [ebp - 0x114]
call fcn.00521e49
jmp 0x521a0a
lea eax, [ebp - 0xc]
push eax
push esi
push esi
lea eax, [ebp - 0x2114]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
test eax, eax
js 0x521a43
mov eax, dword [ebp - 0xc]
push 4
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
push 4
push esi
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
jmp 0x521a0a
lea eax, [ebp - 0x2114]
push eax
call fcn.00553a47
mov dword [ebp - 0xc], eax
pop ecx
test al, 1
jne 0x521971
cdq
lea ecx, [ebp - 0x114]
sub eax, edx
mov dword [ebp - 0x114], esi
mov ebx, eax
sar ebx, 1
push ebx
mov dword [ebp - 0x10], ebx
call fcn.00521a4a
cmp dword [ebp - 0x114], esi
jne 0x52197b
lea ecx, [ebp - 0x114]
call fcn.00521e40
mov eax, 0x80004005
jmp 0x521a43
push ebx
push esi
push dword [ebp - 0x114]
call fcn.00548bf0
mov eax, esi
mov dword [ebp - 4], esi
add esp, 0xc
cmp dword [ebp - 0xc], eax
jle 0x5219d4
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x114]
mov edi, eax
movzx eax, word [ebp + eax*2 - 0x2114]
push eax
shr edi, 1
call fcn.00521caa
mov edx, dword [ebp - 4]
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 - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, ebx
jl 0x521998
mov ebx, dword [ebp - 0x10]
xor esi, esi
mov eax, dword [ebp + 8]
push ebx
push dword [ebp - 0x114]
push 3
push esi
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x110]
cmp dword [ebp - 0x114], eax
je 0x521a07
lea ecx, [ebp - 0x114]
call fcn.00521e40
mov ebx, dword [ebp - 8]
test edi, edi
je 0x521a30
push edi
call fcn.00521c48
pop ecx
jmp 0x521a43
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2114]
push 1
push eax
push dword [ebp + 0xc]
call fcn.004b5be8
jmp 0x521927
push dword [ebp + 0x10]
mov ecx, ebx
call fcn.0052205f
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret 0xc