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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d01e
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x438928]
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
mov dword [ebp - 4], 0
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.00416250
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40ec2e
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00406b00
mov byte [ebp - 4], 1
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov edx, 0x43a420
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 2
call fcn.0040d600
mov edx, str.7Iau
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 3
call fcn.0040d600
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], 0
je 0x40eba1
mov eax, dword [ebp - 0x238]
cmp dword [eax - 0xc], 0
je 0x40eba1
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040fca0
push dword [ebp - 0x224]
lea ecx, [ebp - 0x220]
call fcn.00410640
test eax, eax
je 0x40eba1
mov ecx, dword [ebp - 0x220]
call fcn.0040e0a0
test eax, eax
je 0x40eba1
push dword [ebp - 0x238]
lea ecx, [ebp - 0x220]
call fcn.00410640
test eax, eax
je 0x40eba1
push 0
lea ecx, [ebp - 0x220]
call fcn.004105c0
test eax, eax
je 0x40eba1
mov ecx, dword [ebp - 0x220]
push 0x19f7b
mov edx, 0x454748
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40eba1
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x224]
call fcn.0040fca0
call fcn.00407c30
test eax, eax
je 0x40e964
mov edx, 0x43a4a4
lea ecx, [ebp - 0x228]
call fcn.0040d600
mov edx, 0x43a468
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 5
call fcn.0040d600
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 6
call fcn.00410080
push dword [ebp - 0x22c]
lea ecx, [ebp - 0x224]
push dword [ebp - 0x228]
call fcn.0040fd10
lea ecx, [ebp - 0x22c]
call fcn.00406bb0
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 4
call fcn.00406bb0
mov edx, 0x43a3c4
lea ecx, [ebp - 0x23c]
call fcn.0040d600
mov edx, 0x43a390
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 7
call fcn.0040d600
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x23c]
cmp dword [eax - 0xc], 0
je 0x40eb8b
mov eax, dword [ebp - 0x230]
cmp dword [eax - 0xc], 0
je 0x40eb8b
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040fca0
push dword [ebp - 0x23c]
lea ecx, [ebp - 0x220]
call fcn.00410640
test eax, eax
je 0x40eb8b
mov ecx, dword [ebp - 0x220]
call fcn.0040e0a0
test eax, eax
je 0x40eb8b
push dword [ebp - 0x230]
lea ecx, [ebp - 0x220]
call fcn.00410640
test eax, eax
je 0x40eb8b
mov esi, dword [ebp - 0x220]
push 0x1a1cb
mov edx, 0x43a578
mov ecx, esi
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40eb8b
mov ecx, esi
call fcn.0040e690
test eax, eax
je 0x40eb8b
mov edx, 0x43a36c
lea ecx, [ebp - 0x228]
call fcn.0040d600
mov edx, 0x43a328
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 9
call fcn.0040d600
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x228]
cmp dword [eax - 0xc], 0
je 0x40eb75
mov ecx, dword [ebp - 0x22c]
cmp dword [ecx - 0xc], 0
je 0x40eb75
cmp dword [0x46fe88], 0
je 0x40ea8b
push 1
push ecx
push eax
jmp 0x40eaba
push 0
push ecx
mov ecx, dword [ebp - 0x224]
push eax
call fcn.00406a80
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40ead2
call fcn.004061c0
test eax, eax
je 0x40eaca
push 1
push dword [ebp - 0x22c]
push dword [ebp - 0x228]
mov ecx, dword [ebp - 0x224]
call fcn.00406a80
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40eb6b
mov edx, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x228]
call fcn.0040ad10
push 0
push 0
push 0
push dword [ebp - 0x224]
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor ebx, ebx
call fcn.004061c0
test eax, eax
je 0x40eb6b
push 3
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x40eb6b
mov eax, dword [ebp - 0x228]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x224]
push ebx
push 2
push 0x10
push 0x12
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x40eb47
push eax
mov ebx, 1
call esi
push edi
call esi
test ebx, ebx
je 0x40eb6b
push fcn.0040d280
push 0x434f88
call fcn.0041519f
push dword [ebp - 0x228]
call fcn.0040d280
add esp, 0xc
call fcn.004125f0
call fcn.00412890
lea ecx, [ebp - 0x22c]
call fcn.00406bb0
lea ecx, [ebp - 0x228]
call fcn.00406bb0
lea ecx, [ebp - 0x230]
call fcn.00406bb0
lea ecx, [ebp - 0x23c]
call fcn.00406bb0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x238]
add edx, 0xfffffff0
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40ebc7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ebea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ec0d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40ec2e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.00413c49
mov esp, ebp
pop ebp
ret