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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438e5e
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x444690]
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.00422250
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 0x40c3ae
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00404240
mov byte [ebp - 4], 1
mov eax, dword [0x444008]
mov ecx, 0x444008
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov edx, 0x446418
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 2
call fcn.0040ad60
mov edx, 0x4463f4
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 3
call fcn.0040ad60
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], 0
je 0x40c321
mov eax, dword [ebp - 0x238]
cmp dword [eax - 0xc], 0
je 0x40c321
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040d420
push dword [ebp - 0x224]
lea ecx, [ebp - 0x220]
call fcn.0040ddc0
test eax, eax
je 0x40c321
mov ecx, dword [ebp - 0x220]
call fcn.0040b800
test eax, eax
je 0x40c321
push dword [ebp - 0x238]
lea ecx, [ebp - 0x220]
call fcn.0040ddc0
test eax, eax
je 0x40c321
push 0
lea ecx, [ebp - 0x220]
call fcn.0040dd40
test eax, eax
je 0x40c321
mov ecx, dword [ebp - 0x220]
push 0x1a045
mov edx, 0x460838
call fcn.0040ba50
add esp, 4
test eax, eax
je 0x40c321
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x224]
call fcn.0040d420
call fcn.00405390
test eax, eax
je 0x40c0e4
mov edx, 0x44649c
lea ecx, [ebp - 0x228]
call fcn.0040ad60
mov edx, 0x446460
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 5
call fcn.0040ad60
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 6
call fcn.0040d800
push dword [ebp - 0x22c]
lea ecx, [ebp - 0x224]
push dword [ebp - 0x228]
call fcn.0040d490
lea ecx, [ebp - 0x22c]
call fcn.004042f0
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 4
call fcn.004042f0
mov edx, 0x4463bc
lea ecx, [ebp - 0x23c]
call fcn.0040ad60
mov edx, 0x446388
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 7
call fcn.0040ad60
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x23c]
cmp dword [eax - 0xc], 0
je 0x40c30b
mov eax, dword [ebp - 0x230]
cmp dword [eax - 0xc], 0
je 0x40c30b
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040d420
push dword [ebp - 0x23c]
lea ecx, [ebp - 0x220]
call fcn.0040ddc0
test eax, eax
je 0x40c30b
mov ecx, dword [ebp - 0x220]
call fcn.0040b800
test eax, eax
je 0x40c30b
push dword [ebp - 0x230]
lea ecx, [ebp - 0x220]
call fcn.0040ddc0
test eax, eax
je 0x40c30b
mov esi, dword [ebp - 0x220]
push 0x1a2c8
mov edx, 0x446570
mov ecx, esi
call fcn.0040ba50
add esp, 4
test eax, eax
je 0x40c30b
mov ecx, esi
call fcn.0040be10
test eax, eax
je 0x40c30b
mov edx, str.pI._O
lea ecx, [ebp - 0x228]
call fcn.0040ad60
mov edx, 0x446320
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 9
call fcn.0040ad60
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x228]
cmp dword [eax - 0xc], 0
je 0x40c2f5
mov ecx, dword [ebp - 0x22c]
cmp dword [ecx - 0xc], 0
je 0x40c2f5
cmp dword [0x47bfd8], 0
je 0x40c20b
push 1
push ecx
push eax
jmp 0x40c23a
push 0
push ecx
mov ecx, dword [ebp - 0x224]
push eax
call fcn.004041c0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40c252
call fcn.00403900
test eax, eax
je 0x40c24a
push 1
push dword [ebp - 0x22c]
push dword [ebp - 0x228]
mov ecx, dword [ebp - 0x224]
call fcn.004041c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40c2eb
mov edx, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x228]
call fcn.00408470
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.00403900
test eax, eax
je 0x40c2eb
push 3
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x40c2eb
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 0x40c2c7
push eax
mov ebx, 1
call esi
push edi
call esi
test ebx, ebx
je 0x40c2eb
push fcn.0040a9e0
push 0x440fd8
call fcn.0042119f
push dword [ebp - 0x228]
call fcn.0040a9e0
add esp, 0xc
call fcn.0040fd70
call fcn.00410010
lea ecx, [ebp - 0x22c]
call fcn.004042f0
lea ecx, [ebp - 0x228]
call fcn.004042f0
lea ecx, [ebp - 0x230]
call fcn.004042f0
lea ecx, [ebp - 0x23c]
call fcn.004042f0
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 0x40c347
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 0x40c36a
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 0x40c38d
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 0x40c3ae
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.0041fc54
mov esp, ebp
pop ebp
ret