Function at 0x501560
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58b166
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2124
call fcn.00520260
mov eax, dword [0x5ca104]
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 esi, ecx
mov dword [ebp - 0x2128], esi
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2134], eax
lea eax, [ebp - 0x2014]
push eax
mov dword [ebp - 0x2130], esi
mov dword [ebp - 0x2124], ebx
mov dword [ebp - 0x2120], edi
mov dword [ebp - 0x211c], 0
call fcn.005022e0
test eax, eax
js 0x501906
lea eax, [ebp - 0x211c]
push eax
lea eax, [ebp - 0x2014]
push eax
call fcn.005047c0
add esp, 8
test eax, eax
jne 0x501601
mov eax, 0x80020009
jmp 0x501906
mov ecx, esi
call fcn.00504130
lea eax, [ebp - 0x2014]
mov ecx, esi
push eax
call fcn.005022e0
test eax, eax
js 0x501906
movzx eax, word [ebp - 0x211c]
cmp eax, 0x13
ja 0x5017ee
je 0x501794
cmp eax, 8
je 0x50177c
cmp eax, 0x11
jne 0x5018f0
lea ebx, [ebp - 0x2014]
lea ecx, [ebx + 2]
nop
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x501650
sub ebx, ecx
sar ebx, 1
mov dword [ebp - 0x212c], ebx
test bl, 1
jne 0x5016d9
mov eax, ebx
mov dword [ebp - 0x2118], 0
cdq
sub eax, edx
mov esi, eax
sar esi, 1
mov dword [ebp - 0x211c], esi
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x2118]
push esi
mov byte [ebp - 4], 4
call fcn.00501930
jmp 0x5016ba
mov eax, dword [ebp - 0x2118]
test eax, eax
jne 0x5016e3
lea eax, [ebp - 0x2114]
test eax, eax
je 0x5016d9
lea ecx, [ebp - 0x2118]
call fcn.00501f20
mov eax, 0x80004005
jmp 0x501906
push esi
push 0
push eax
call fcn.00524040
add esp, 0xc
xor edi, edi
test ebx, ebx
jle 0x501739
nop word [eax + eax]
movzx eax, word [ebp + edi*2 - 0x2014]
mov esi, edi
shr esi, 1
add esi, dword [ebp - 0x2118]
push eax
call fcn.00501be0
mov edx, edi
mov ecx, 4
and edx, 1
inc edi
shl edx, 2
add esp, 4
sub ecx, edx
shl al, cl
or byte [esi], al
cmp edi, ebx
jl 0x501700
mov esi, dword [ebp - 0x211c]
mov ecx, dword [ebp - 0x2124]
push esi
push dword [ebp - 0x2118]
push 3
push 0
push dword [ebp - 0x2120]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
lea eax, [ebp - 0x2114]
cmp dword [ebp - 0x2118], eax
je 0x5018db
lea ecx, [ebp - 0x2118]
call fcn.00501f20
jmp 0x5018db
push 1
lea eax, [ebp - 0x2014]
mov ecx, ebx
push eax
push edi
call fcn.0045bcd0
mov esi, eax
jmp 0x5018db
lea eax, [ebp - 0x212c]
mov dword [ebp - 0x211c], 0
push eax
push 0
push 0
lea eax, [ebp - 0x2014]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x5017ce
lea ecx, [ebp - 0x211c]
call fcn.0042ecc0
mov eax, esi
jmp 0x501906
push dword [ebp - 0x212c]
mov ecx, ebx
push edi
call fcn.00504040
lea ecx, [ebp - 0x211c]
mov esi, eax
call fcn.0042ecc0
jmp 0x5018db
cmp eax, 0x4008
jne 0x5018f0
lea ecx, [ebp - 0x2014]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x501802
sub ecx, edx
mov dword [ebp - 0x2118], 0
sar ecx, 1
add ecx, 2
push ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2118]
mov byte [ebp - 4], 1
call fcn.00501970
jmp 0x501849
mov edi, dword [ebp - 0x2118]
test edi, edi
je 0x5018c1
cmp word [ebp - 0x2014], 0
lea esi, [ebp - 0x2014]
je 0x50189c
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
nop dword [eax]
push esi
call ebx
movzx ecx, word [esi]
cmp ecx, 0x5c
jne 0x50188d
cmp word [eax], 0x30
jne 0x50188d
xor ecx, ecx
push eax
mov word [edi], cx
call ebx
mov esi, eax
jmp 0x501893
mov word [edi], cx
add esi, 2
add edi, 2
cmp word [esi], 0
jne 0x501870
mov ecx, dword [ebp - 0x2124]
xor eax, eax
mov dword [edi], eax
push dword [ebp - 0x2118]
push dword [ebp - 0x2120]
call fcn.00504060
mov edi, dword [ebp - 0x2118]
mov esi, eax
jmp 0x5018c6
mov esi, 0xe
lea eax, [ebp - 0x2114]
cmp edi, eax
je 0x5018db
lea ecx, [ebp - 0x2118]
call fcn.00501f30
test esi, esi
je 0x5018ea
push esi
call fcn.0047eee0
add esp, 4
jmp 0x501906
mov esi, dword [ebp - 0x2128]
push dword [ebp - 0x2134]
mov ecx, esi
call fcn.005022e0
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.0051fefc
mov esp, ebp
pop ebp
ret 0xc