Function at 0x46dc10
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
cmp dword [0x571518], 0
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1018], edi
je 0x46dc4e
mov eax, 1
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
push ebx
push esi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [ebp - 0x1010], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x1014], esi
test esi, esi
je 0x46de65
push str.INSTALLING_DRIVER
push edi
call fcn.00472170
add esp, 8
push ebx
push ebx
push ebx
push ebx
push ebx
push str.System32driversCnCrypt.sys
push 1
push 1
push 1
push 0xf01ff
push 0x51a1d0
push 0x51a1d0
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
je 0x46de65
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
push 0x51a1d0
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x46de65
push str.STARTING_DRIVER
push edi
call fcn.00472170
add esp, 8
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x46de52
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
jne 0x46de65
push 0x802
lea eax, [ebp - 0x808]
push 0
push eax
call fcn.004e46b0
push 0x802
lea eax, [ebp - 0x100c]
push 0
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
je 0x46de65
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 0x46dd50
lea edx, [ebp - 0x100c]
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x46dd70
lea edi, [ebp - 0x808]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x46dd86
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 0x46ddb0
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
jne 0x46de59
lea ecx, [ebp - 0x808]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46ddf0
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
jne 0x46de59
push dword [ebp - 0x1010]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push ebx
mov dword [ebp - 0x1010], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov esi, dword [ebp - 0x1014]
test eax, eax
je 0x46de5f
mov edi, 1
jmp 0x46de8f
mov esi, dword [ebp - 0x1014]
mov edi, dword [ebp - 0x1018]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x420
jne 0x46de79
mov edi, 1
jmp 0x46de8f
push edi
call fcn.00417c00
push edi
push str.DRIVER_INSTALL_FAILED
call fcn.00419a00
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 0x1010]
test eax, eax
je 0x46dea0
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x46deaf
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
jmp 0x46deb5
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x46debc
push esi
call ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.004e1f40
mov esp, ebp
pop ebp
ret