Function at 0x4a1440
Capabilities:
Create service
Delete service
Get common file path
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
mov eax, dword [0x55e2f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x80c]
mov dword [ebp - 0x80c], 0
push eax
push str.Start
push str.SYSTEMCurrentControlSetServicesCnCrypt
xor ebx, ebx
call fcn.004c0c50
add esp, 0xc
test eax, eax
je 0x4a14a0
mov eax, dword [ebp - 0x80c]
cmp eax, 1
je 0x4a148c
test eax, eax
jne 0x4a14a0
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x808]
push eax
push 0x400
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea ecx, [ebp - 0x808]
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4a14c0
mov eax, dword [str.CnCrypt.sys]
mov dword [ecx], eax
mov eax, dword [0x523c44]
mov dword [ecx + 4], eax
mov eax, dword [0x523c48]
mov dword [ecx + 8], eax
mov eax, dword [0x523c4c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x523c50]
mov dword [ecx + 0x10], eax
mov eax, dword [0x523c54]
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x808]
push eax
call fcn.0041bf70
test eax, eax
mov edx, str.CnCrypt_x64.sys
mov ecx, str.CnCrypt.sys
cmovne ecx, edx
push ecx
call fcn.0046c750
add esp, 8
test eax, eax
je 0x4a167a
lea eax, [ebp - 0x808]
push eax
call fcn.00414f30
add esp, 4
test eax, eax
je 0x4a167a
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4a1595
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 5
jne 0x4a1580
push edi
push str.ADMIN_PRIVILEGES_DRIVER
call fcn.00419a00
add esp, 8
lea eax, [edi + 0x1c]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
push esi
push 0xf01ff
push 0x51a1d0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x4a15c6
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x1f4
call dword [sym.imp.KERNEL32.DLL_Sleep]
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x808]
push eax
push 1
push 3
push 1
push 0xf01ff
push 0x51a1d0
push 0x51a1d0
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x4a15fe
lea ebx, [eax + 1]
jmp 0x4a1636
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
test esi, esi
jne 0x4a1621
lea ebx, [eax + 1]
jmp 0x4a1636
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
mov ecx, 1
cmove ebx, ecx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x810], eax
test esi, esi
je 0x4a1654
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x810]
call dword [sym.imp.KERNEL32.DLL_SetLastError]
pop esi
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
push 0
push str.DRIVER_NOT_FOUND
call fcn.00419a00
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x1c
pop ebx
call fcn.004e1f40
mov esp, ebp
pop ebp
ret