Function at 0x515756
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6edb1d
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2128
call fcn.006839e0
mov eax, dword [0x7b088c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2120], ecx
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2138], eax
lea eax, [ebp - 0x2014]
push eax
mov dword [ebp - 0x2134], ecx
mov dword [ebp - 0x2128], edi
mov dword [ebp - 0x2124], esi
mov dword [ebp - 0x211c], ebx
call fcn.00516483
test eax, eax
js 0x515acd
lea eax, [ebp - 0x211c]
push eax
lea eax, [ebp - 0x2014]
push eax
call fcn.00517cba
pop ecx
pop ecx
test eax, eax
jne 0x5157f2
mov eax, 0x80020009
jmp 0x515acd
mov ecx, dword [ebp - 0x2120]
call fcn.00517782
mov ecx, dword [ebp - 0x2120]
lea eax, [ebp - 0x2014]
push eax
call fcn.00516483
test eax, eax
js 0x515acd
movzx eax, word [ebp - 0x211c]
sub eax, 8
je 0x515a93
sub eax, 9
je 0x51595b
dec eax
sub eax, 1
je 0x515917
sub eax, 0x3ff5
jne 0x515ab3
lea eax, [ebp - 0x2014]
push eax
call fcn.006a37ec
pop ecx
add eax, 2
mov dword [ebp - 0x2118], ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x2118]
push eax
mov byte [ebp - 4], 1
call fcn.00515d0e
jmp 0x515884
mov esi, dword [ebp - 0x2118]
test esi, esi
je 0x5158f6
cmp word [ebp - 0x2014], 0
lea edi, [ebp - 0x2014]
je 0x5158d1
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x5158c3
cmp word [eax], 0x30
jne 0x5158c3
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x5158c9
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x51589e
mov ecx, dword [ebp - 0x2128]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x2118]
push dword [ebp - 0x2124]
call fcn.005176d1
mov esi, dword [ebp - 0x2118]
mov edi, eax
jmp 0x5158f9
push 0xe
pop edi
lea eax, [ebp - 0x2114]
cmp esi, eax
je 0x515aa6
lea ecx, [ebp - 0x2118]
call fcn.005161ae
jmp 0x515aa6
lea eax, [ebp - 0x2130]
push eax
push ebx
push ebx
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
test eax, eax
js 0x515acd
mov eax, dword [ebp - 0x2130]
push 4
mov dword [ebp - 0x212c], eax
lea eax, [ebp - 0x212c]
push eax
push 4
push ebx
push esi
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x515aa4
lea eax, [ebp - 0x2014]
push eax
call fcn.006a37ec
mov dword [ebp - 0x212c], eax
pop ecx
test al, 1
je 0x51597c
mov eax, 0x80004005
jmp 0x515acd
cdq
sub eax, edx
mov dword [ebp - 0x2118], ebx
mov esi, eax
sar esi, 1
mov dword [ebp - 0x2130], esi
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x2118]
push esi
mov byte [ebp - 4], 4
call fcn.00515cdf
jmp 0x5159c2
cmp dword [ebp - 0x2118], 0
jne 0x5159e2
lea eax, [ebp - 0x2114]
test eax, eax
je 0x515972
lea ecx, [ebp - 0x2118]
call fcn.005161a5
jmp 0x515972
push esi
push ebx
push dword [ebp - 0x2118]
call fcn.00689b00
add esp, 0xc
mov dword [ebp - 0x211c], ebx
cmp dword [ebp - 0x212c], 0
mov eax, ebx
jle 0x515a58
mov ebx, dword [ebp - 0x212c]
mov edi, eax
test edi, edi
jns 0x515a12
add edi, 1
sar edi, 1
movzx eax, word [ebp + eax*2 - 0x2014]
mov esi, dword [ebp - 0x2118]
push eax
call fcn.00515fa8
mov edx, dword [ebp - 0x211c]
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 - 0x211c]
inc eax
mov dword [ebp - 0x211c], eax
cmp eax, ebx
jl 0x515a09
mov esi, dword [ebp - 0x2130]
xor ebx, ebx
mov eax, dword [ebp - 0x2128]
push esi
push dword [ebp - 0x2118]
push 3
push ebx
push dword [ebp - 0x2124]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x2114]
cmp dword [ebp - 0x2118], eax
je 0x515aa6
lea ecx, [ebp - 0x2118]
call fcn.005161a5
jmp 0x515aa6
push 1
lea eax, [ebp - 0x2014]
mov ecx, edi
push eax
push esi
call fcn.004e72f2
mov edi, eax
test edi, edi
je 0x515ab3
push edi
call fcn.00515f44
pop ecx
jmp 0x515acd
push dword [ebp - 0x2138]
mov ecx, dword [ebp - 0x2120]
call fcn.00516483
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00682c16
mov esp, ebp
pop ebp
ret 0xc