Function at 0x40e310
Capabilities:
Create process on windows
Create service
Get common file path
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428b7e
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x430618]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x21a]
mov dword [ebp - 4], 0
push ecx
mov word [ebp - 0x21c], ax
call fcn.004178a0
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x21c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40e7f2
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x21c]
call fcn.004068c0
mov byte [ebp - 4], 1
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x224]
push 0x4668a8
push ecx
mov byte [ebp - 4], 2
call fcn.0040ca40
add esp, 8
lea edx, [ebp - 0x238]
push 0x4668d0
push edx
mov byte [ebp - 4], 3
call fcn.0040ca40
add esp, 8
mov bl, 4
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], 0
je 0x40e75a
mov ecx, dword [ebp - 0x238]
cmp dword [ecx - 0xc], 0
je 0x40e75a
lea eax, [ebp - 0x234]
lea edi, [ebp - 0x220]
call fcn.0040fa90
mov eax, dword [ebp - 0x224]
mov esi, edi
call fcn.00410540
test eax, eax
je 0x40e75a
mov ecx, dword [ebp - 0x220]
call fcn.0040dca0
test eax, eax
je 0x40e75a
mov eax, dword [ebp - 0x238]
call fcn.00410540
test eax, eax
je 0x40e75a
xor eax, eax
call fcn.004104b0
test eax, eax
je 0x40e75a
mov edx, dword [ebp - 0x220]
push 0x4318a8
mov ecx, 0x195d3
call fcn.0040ded0
add esp, 4
test eax, eax
je 0x40e75a
mov eax, edi
lea edi, [ebp - 0x224]
call fcn.0040fa90
call fcn.00407c10
test eax, eax
je 0x40e4fa
lea edx, [ebp - 0x228]
push 0x4315c4
push edx
call fcn.0040ca40
add esp, 8
lea eax, [ebp - 0x22c]
push 0x4316dc
push eax
mov byte [ebp - 4], 5
call fcn.0040ca40
add esp, 8
mov byte [ebp - 4], 6
call fcn.0040ff40
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
push ecx
push edx
mov eax, edi
push eax
call fcn.0040fb00
lea eax, [ebp - 0x22c]
call fcn.00406ab0
lea eax, [ebp - 0x228]
mov byte [ebp - 4], bl
call fcn.00406ab0
lea ecx, [ebp - 0x23c]
push 0x4668e8
push ecx
call fcn.0040ca40
add esp, 8
lea edx, [ebp - 0x230]
push 0x46694c
push edx
mov byte [ebp - 4], 7
call fcn.0040ca40
add esp, 8
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x23c]
cmp dword [eax - 0xc], 0
je 0x40e744
mov ecx, dword [ebp - 0x230]
cmp dword [ecx - 0xc], 0
je 0x40e744
lea eax, [ebp - 0x234]
lea edi, [ebp - 0x220]
call fcn.0040fa90
mov eax, dword [ebp - 0x23c]
mov esi, edi
call fcn.00410540
test eax, eax
je 0x40e744
mov ecx, dword [ebp - 0x220]
call fcn.0040dca0
test eax, eax
je 0x40e744
mov eax, dword [ebp - 0x230]
call fcn.00410540
test eax, eax
je 0x40e744
mov edx, dword [ebp - 0x220]
push 0x44aec8
mov ecx, 0x1b96e
call fcn.0040ded0
add esp, 4
test eax, eax
je 0x40e744
mov ecx, dword [ebp - 0x220]
call fcn.0040e1e0
test eax, eax
je 0x40e744
lea edx, [ebp - 0x228]
push 0x466974
push edx
call fcn.0040ca40
add esp, 8
lea eax, [ebp - 0x22c]
push 0x4669d8
push eax
mov byte [ebp - 4], 9
call fcn.0040ca40
add esp, 8
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x228]
cmp dword [edx - 0xc], 0
je 0x40e72e
mov eax, dword [ebp - 0x22c]
cmp dword [eax - 0xc], 0
je 0x40e72e
cmp dword [0x468bbc], 0
je 0x40e628
push 0
push eax
push edx
jmp 0x40e669
cmp dword [0x468b74], 0
jne 0x40e68c
mov ecx, dword [0x468b70]
push ecx
push eax
push edx
mov edx, dword [ebp - 0x224]
xor ecx, ecx
call fcn.00406820
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40e686
call fcn.00405ee0
test eax, eax
je 0x40e67e
mov edx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x228]
push 0
push edx
push eax
mov edx, dword [ebp - 0x224]
mov ecx, 1
call fcn.00406820
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40e724
mov edx, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x224]
call fcn.0040a9e0
mov ecx, dword [ebp - 0x224]
push 0
push 0
push 0
push ecx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor edi, edi
call fcn.00405ee0
test eax, eax
je 0x40e724
push 3
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x40e724
mov edx, dword [ebp - 0x224]
mov eax, dword [ebp - 0x228]
push edi
push edi
push edi
push edi
push edi
push edx
push edi
push 2
push 0x10
push 0x12
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
je 0x40e6fb
push eax
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x40e724
push fcn.0040c6e0
push 0x42cd34
call fcn.00416812
mov eax, dword [ebp - 0x228]
push eax
call fcn.0040c6e0
add esp, 0xc
call fcn.004129d0
call fcn.00412c60
lea eax, [ebp - 0x22c]
call fcn.00406ab0
lea eax, [ebp - 0x228]
call fcn.00406ab0
lea eax, [ebp - 0x230]
call fcn.00406ab0
lea eax, [ebp - 0x23c]
call fcn.00406ab0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e780
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00415554
mov esp, ebp
pop ebp
ret