Function at 0x4a1100
Capabilities:
Check if file exists
Create service
Get common file path
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.004e1f60
mov eax, dword [0x55e2f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1018], 0
push 0x802
lea eax, [ebp - 0x808]
mov dword [ebp - 0x1010], ebx
push ebx
push eax
xor esi, esi
call fcn.004e46b0
push 0x802
lea eax, [ebp - 0x100c]
push ebx
push eax
call fcn.004e46b0
add esp, 0x18
lea eax, [ebp - 0x100c]
push 0x401
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
jne 0x4a1173
lea ebx, [esi + 1]
jmp 0x4a13d1
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x100c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x80a], ax
test ax, ax
jne 0x4a1175
lea edi, [ebp - 0x808]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4a1196
lea eax, [ebp - 0x808]
mov ecx, 0xf
mov esi, str.System32DriversCnCrypt.sys
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00414f30
add esp, 4
test eax, eax
jne 0x4a11d5
push 2
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov ebx, 1
xor esi, esi
jmp 0x4a13d1
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1018], edi
test edi, edi
jne 0x4a11fa
lea ebx, [eax + 1]
xor esi, esi
jmp 0x4a13d1
push 0
push 0
push 0
push 0
push 0
push str.System32driversCnCrypt.sys
push 1
push 1
push 1
push 0xf01ff
push 0x51a1d0
push 0x51a1d0
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x4a1233
lea ebx, [eax + 1]
jmp 0x4a13d1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
push 0x51a1d0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1014], esi
test esi, esi
jne 0x4a125f
lea ebx, [eax + 1]
jmp 0x4a13d1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4a13d1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x4a1287
mov ebx, 1
jmp 0x4a13d1
push 0x401
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
jne 0x4a12a5
lea ebx, [eax + 1]
jmp 0x4a13d1
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ecx + 0x51abf8]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x80a], ax
test ax, ax
jne 0x4a12b0
lea edx, [ebp - 0x100c]
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4a12d0
lea edi, [ebp - 0x808]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4a12e6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x808]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4a1310
lea eax, [ebp - 0x1010]
mov ecx, 0xf
push eax
push str.SYSTEMCurrentControlSetServicesCnCrypt
mov esi, str.System32DriversCnCrypt.sys
rep movsd dword es:[edi], dword [esi]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x4a1353
mov esi, dword [ebp - 0x1014]
mov ebx, 1
jmp 0x4a13d1
lea ecx, [ebp - 0x808]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a1360
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x808]
push eax
push 2
push 0
push str.ImagePath
push dword [ebp - 0x1010]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4a13a4
mov esi, dword [ebp - 0x1014]
mov ebx, 1
jmp 0x4a13d1
push dword [ebp - 0x1010]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x1014]
push 0
push 0
push esi
mov dword [ebp - 0x1010], ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
mov ecx, 1
cmove ebx, ecx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
test ebx, ebx
je 0x4a13ed
call dword [sym.imp.KERNEL32.DLL_GetLastError]
xor ecx, ecx
cmp eax, 0x420
cmove ebx, ecx
mov eax, dword [ebp - 0x1010]
test eax, eax
je 0x4a13fe
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4a140d
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4a1413
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x1018]
test eax, eax
je 0x4a1420
push eax
call esi
push edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e1f40
mov esp, ebp
pop ebp
ret