Function at 0x521796
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2114
call fcn.00542070
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.00522050
test eax, eax
js 0x521a35
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2114]
push eax
call fcn.00523445
pop ecx
pop ecx
test eax, eax
jne 0x5217e3
mov eax, 0x80020009
jmp 0x521a35
mov ecx, ebx
call fcn.00522f86
lea eax, [ebp - 0x2114]
mov ecx, ebx
push eax
call fcn.00522050
test eax, eax
js 0x521a35
movzx eax, word [ebp - 4]
push edi
sub eax, 8
je 0x521a08
sub eax, 9
je 0x52191f
dec eax
sub eax, 1
je 0x5218e0
sub eax, 0x3ff5
jne 0x521a21
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.00521a6a
mov esi, dword [ebp - 0x114]
test esi, esi
je 0x5218bf
cmp word [ebp - 0x2114], 0
lea edi, [ebp - 0x2114]
je 0x5218a0
xor ebx, ebx
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x52188f
cmp word [eax], 0x30
jne 0x52188f
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x521895
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x52186a
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.00522eed
mov esi, dword [ebp - 0x114]
mov edi, eax
jmp 0x5218c2
push 0xe
pop edi
lea eax, [ebp - 0x110]
cmp esi, eax
je 0x5219fb
lea ecx, [ebp - 0x114]
call fcn.00521e3a
jmp 0x5219fb
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 0x521a34
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 0x5219fb
lea eax, [ebp - 0x2114]
push eax
call fcn.00553a47
mov dword [ebp - 0xc], eax
pop ecx
test al, 1
jne 0x521962
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.00521a3b
cmp dword [ebp - 0x114], esi
jne 0x52196c
lea ecx, [ebp - 0x114]
call fcn.00521e31
mov eax, 0x80004005
jmp 0x521a34
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 0x5219c5
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.00521c9b
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 0x521989
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 0x5219f8
lea ecx, [ebp - 0x114]
call fcn.00521e31
mov ebx, dword [ebp - 8]
test edi, edi
je 0x521a21
push edi
call fcn.00521c39
pop ecx
jmp 0x521a34
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2114]
push 1
push eax
push dword [ebp + 0xc]
call fcn.004b5be8
jmp 0x521918
push dword [ebp + 0x10]
mov ecx, ebx
call fcn.00522050
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret 0xc