Function at 0x504630
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2110
call fcn.0052ad70
push esi
lea eax, [ebp - 0x2110]
mov dword [ebp - 4], 0
mov esi, ecx
push eax
mov dword [ebp - 8], esi
call fcn.00505610
test eax, eax
js 0x504926
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2110]
push eax
call fcn.00507210
add esp, 8
test eax, eax
jne 0x504681
mov eax, 0x80020009
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, esi
call fcn.00506aa0
lea eax, [ebp - 0x2110]
mov ecx, esi
push eax
call fcn.00505610
test eax, eax
js 0x504926
movzx eax, word [ebp - 4]
push ebx
push edi
cmp eax, 0x13
jg 0x504830
je 0x5047de
cmp eax, 8
je 0x5047c3
cmp eax, 0x11
jne 0x504911
lea ebx, [ebp - 0x2110]
lea ecx, [ebx + 2]
mov edi, edi
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x5046d0
sub ebx, ecx
sar ebx, 1
test bl, 1
jne 0x504725
mov eax, ebx
mov dword [ebp - 0x110], 0
cdq
lea ecx, [ebp - 0x110]
sub eax, edx
mov esi, eax
sar esi, 1
push esi
mov dword [ebp - 4], esi
call fcn.00504930
mov eax, dword [ebp - 0x110]
test eax, eax
jne 0x504733
lea eax, [ebp - 0x10c]
test eax, eax
je 0x504725
lea ecx, [ebp - 0x110]
call fcn.005050f0
pop edi
pop ebx
mov eax, 0x80004005
pop esi
mov esp, ebp
pop ebp
ret 0xc
push esi
push 0
push eax
call fcn.005278d0
add esp, 0xc
xor edi, edi
test ebx, ebx
jle 0x504786
jmp 0x504750
movzx eax, word [ebp + edi*2 - 0x2110]
mov esi, edi
shr esi, 1
add esi, dword [ebp - 0x110]
push eax
call fcn.00504d80
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 0x504750
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 8]
push esi
push dword [ebp - 0x110]
push 3
push 0
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x10c]
cmp dword [ebp - 0x110], eax
je 0x5048f8
lea ecx, [ebp - 0x110]
call fcn.005050f0
jmp 0x5048f8
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2110]
push 1
push eax
push dword [ebp + 0xc]
call fcn.0045f5f2
mov edi, eax
jmp 0x5048fb
lea eax, [ebp - 0xc]
mov dword [ebp - 4], 0
push eax
push 0
push 0
lea eax, [ebp - 0x2110]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x504813
lea ecx, [ebp - 4]
call fcn.004dc1eb
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.0045f64d
lea ecx, [ebp - 4]
mov edi, eax
call fcn.004dc1eb
jmp 0x5048f8
cmp eax, 0x4008
jne 0x504911
lea ecx, [ebp - 0x2110]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x504844
sub ecx, edx
mov dword [ebp - 0x110], 0
sar ecx, 1
lea eax, [ecx + 2]
push eax
lea ecx, [ebp - 0x110]
call fcn.00504970
mov esi, dword [ebp - 0x110]
test esi, esi
je 0x5048de
cmp word [ebp - 0x2110], 0
lea edi, [ebp - 0x2110]
je 0x5048bf
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
lea esp, [esp]
push edi
call ebx
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x5048b0
cmp word [eax], 0x30
jne 0x5048b0
xor ecx, ecx
mov word [esi], cx
add esi, 2
push eax
call ebx
mov edi, eax
jmp 0x5048b9
mov word [esi], cx
add esi, 2
add edi, 2
cmp word [edi], 0
jne 0x504890
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [esi], eax
push dword [ebp - 0x110]
push dword [ebp + 0xc]
call fcn.005069e0
mov esi, dword [ebp - 0x110]
mov edi, eax
jmp 0x5048e3
mov edi, 0xe
lea eax, [ebp - 0x10c]
cmp esi, eax
je 0x5048f8
lea ecx, [ebp - 0x110]
call fcn.00505100
mov esi, dword [ebp - 8]
test edi, edi
je 0x504911
push edi
call fcn.00504cc0
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp + 0x10]
mov ecx, esi
call fcn.00505610
xor ecx, ecx
test eax, eax
pop edi
cmovs ecx, eax
mov eax, ecx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc