Function at 0x50e4c0
Capabilities:
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x53120c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
lea eax, [ebp - 0x20c]
push edi
mov ecx, 0x208
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x50e4e3
push 0x104
lea eax, [ebp - 0x20c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x50e618
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.00510a2a
add esp, 8
test eax, eax
je 0x50e523
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0
push eax
push 0x2001f
push 0
push str.SOFTWAREVAIO_CorporationVAIO_UWP_Update
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x50e583
mov esi, dword [ebp - 0x218]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 4
push 0x527d50
push 1
push eax
push str.UWPServiceFirstExecute
push esi
call edi
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x50e576
jmp 0x50e5ee
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x214], 0
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0x2021f
push 0
push 0
push 0
push str.SOFTWAREVAIO_CorporationVAIO_UWP_Update
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x50e618
mov esi, dword [ebp - 0x214]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 4
push 0x527d50
push 1
push eax
push str.UWPServiceFirstExecute
push esi
call edi
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x50e5e3
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push str.InstalledDir
push esi
call edi
test esi, esi
je 0x50e618
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, ebx
call fcn.0050e7e0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x210], eax
test eax, eax
je 0x50e7c2
push ebx
push 0x50ec10
lea eax, [ebx + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerExW]
push dword [ebp + 8]
mov ecx, ebx
mov dword [ebx + 0x240], eax
call fcn.0050e260
mov esi, eax
mov dword [ebp - 0x214], esi
test esi, esi
js 0x50e793
cmp dword [ebx + 0x260], 0
je 0x50e6b0
or dword [ebx + 0x24c], 0x84
lea edi, [ebx + 0x244]
mov esi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push edi
push dword [ebx + 0x240]
call esi
mov ecx, 4
lea eax, [ebx + 0x248]
xchg dword [eax], ecx
push edi
push dword [ebx + 0x240]
call esi
mov esi, dword [ebp - 0x214]
mov ecx, ebx
call fcn.0050df10
test eax, eax
je 0x50e77f
lea eax, [ebp - 0x210]
push eax
call fcn.00506970
lea eax, [ebp - 0x210]
push eax
call fcn.00508ba0
lea eax, [ebp - 0x210]
push eax
call fcn.00508ee0
add esp, 0xc
call fcn.005090a0
call fcn.005089f0
call fcn.005087b0
call fcn.00508d70
call fcn.00506f40
mov ecx, ebx
call fcn.0050dc30
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x50e765
xor esi, esi
push 0xf01ff
push str.VAIO_Event_Service
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x50e745
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
mov eax, 1
push edi
cmovne esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebx + 0x268], 0
jne 0x50e765
test esi, esi
jne 0x50e765
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x210]
jmp 0x50e712
mov ecx, ebx
call fcn.0050e470
cmp byte [ebx + 0x3c], 0
mov esi, eax
je 0x50e793
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x50e793
call fcn.00504f70
call fcn.00505c90
call fcn.00505010
call fcn.00505590
lea eax, [ebp - 0x210]
mov ecx, ebx
push eax
call fcn.0050d9f0
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050f225
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0050f225
mov esp, ebp
pop ebp
ret 4