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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432c1e
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x43a4a0]
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 - reloc.avifil32.dll_AVIStreamOpenFromFileA], ax
call fcn.00421da0
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 0x40ba5a
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x21c]
call fcn.004043c0
mov byte [ebp - 4], 1
mov edx, dword [0x43a008]
mov eax, dword [edx + 0xc]
mov ecx, 0x43a008
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x224]
push 0x46636c
push ecx
mov byte [ebp - 4], 2
call fcn.0040a350
add esp, 8
lea edx, [ebp - 0x238]
push 0x46639c
push edx
mov byte [ebp - 4], 3
call fcn.0040a350
add esp, 8
mov bl, 4
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], 0
je 0x40b9c2
mov ecx, dword [ebp - 0x238]
cmp dword [ecx - 0xc], 0
je 0x40b9c2
lea eax, [ebp - 0x234]
lea edi, [ebp - 0x220]
call fcn.0040cb90
mov eax, dword [ebp - 0x224]
mov esi, edi
call fcn.0040d660
test eax, eax
je 0x40b9c2
mov ecx, dword [ebp - 0x220]
call fcn.0040af10
test eax, eax
je 0x40b9c2
mov eax, dword [ebp - 0x238]
call fcn.0040d660
test eax, eax
je 0x40b9c2
xor eax, eax
call fcn.0040d5d0
test eax, eax
je 0x40b9c2
mov edx, dword [ebp - 0x220]
push 0x43b8c8
mov ecx, 0x106ae
call fcn.0040b160
add esp, 4
test eax, eax
je 0x40b9c2
mov eax, edi
lea edi, [ebp - 0x224]
call fcn.0040cb90
call fcn.00405550
test eax, eax
je 0x40b77a
lea edx, [ebp - 0x228]
push 0x4662f4
push edx
call fcn.0040a350
add esp, 8
lea eax, [ebp - 0x22c]
push 0x466330
push eax
mov byte [ebp - 4], 5
call fcn.0040a350
add esp, 8
mov byte [ebp - 4], 6
call fcn.0040d040
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
push ecx
push edx
mov eax, edi
push eax
call fcn.0040cc00
lea eax, [ebp - 0x22c]
call fcn.0040ae80
lea eax, [ebp - 0x228]
mov byte [ebp - 4], bl
call fcn.0040ae80
lea ecx, [ebp - 0x23c]
push 0x4663d8
push ecx
call fcn.0040a350
add esp, 8
lea edx, [ebp - 0x230]
push 0x466418
push edx
mov byte [ebp - 4], 7
call fcn.0040a350
add esp, 8
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x23c]
cmp dword [eax - 0xc], 0
je 0x40b9ac
mov ecx, dword [ebp - 0x230]
cmp dword [ecx - 0xc], 0
je 0x40b9ac
lea eax, [ebp - 0x234]
lea edi, [ebp - 0x220]
call fcn.0040cb90
mov eax, dword [ebp - 0x23c]
mov esi, edi
call fcn.0040d660
test eax, eax
je 0x40b9ac
mov ecx, dword [ebp - 0x220]
call fcn.0040af10
test eax, eax
je 0x40b9ac
mov eax, dword [ebp - 0x230]
call fcn.0040d660
test eax, eax
je 0x40b9ac
mov edx, dword [ebp - 0x220]
push 0x44bf78
mov ecx, 0x1a2e5
call fcn.0040b160
add esp, 4
test eax, eax
je 0x40b9ac
mov ecx, dword [ebp - 0x220]
call fcn.0040b460
test eax, eax
je 0x40b9ac
lea edx, [ebp - 0x228]
push 0x466440
push edx
call fcn.0040a350
add esp, 8
lea eax, [ebp - 0x22c]
push 0x466488
push eax
mov byte [ebp - 4], 9
call fcn.0040a350
add esp, 8
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x228]
cmp dword [eax - 0xc], 0
je 0x40b996
mov edx, dword [ebp - 0x22c]
cmp dword [edx - 0xc], 0
je 0x40b996
cmp dword [0x468944], 0
mov ecx, dword [ebp - 0x224]
je 0x40b8ad
push 1
push eax
jmp 0x40b8dc
push 0
push eax
call fcn.00404320
mov esi, eax
add esp, 8
test esi, esi
je 0x40b8ee
call fcn.00403b30
test eax, eax
je 0x40b8e6
mov ecx, dword [ebp - 0x228]
mov edx, dword [ebp - 0x22c]
push 1
push ecx
mov ecx, dword [ebp - 0x224]
call fcn.00404320
mov esi, eax
add esp, 8
test esi, esi
jne 0x40b98c
mov ecx, dword [ebp - 0x224]
mov edx, dword [ebp - 0x228]
call fcn.00408350
mov edx, dword [ebp - 0x224]
push 0
push 0
push 0
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor edi, edi
call fcn.00403b30
test eax, eax
je 0x40b98c
push 3
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x40b98c
mov eax, dword [ebp - 0x224]
push edi
push edi
push edi
push edi
push edi
push eax
mov eax, dword [ebp - 0x228]
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 0x40b963
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 0x40b98c
push fcn.00409ff0
push 0x4368e8
call fcn.00420ebd
mov ecx, dword [ebp - 0x228]
push ecx
call fcn.00409ff0
add esp, 0xc
call fcn.0040fb10
call fcn.0040fda0
lea eax, [ebp - 0x22c]
call fcn.0040ae80
lea eax, [ebp - 0x228]
call fcn.0040ae80
lea eax, [ebp - 0x230]
call fcn.0040ae80
lea eax, [ebp - 0x23c]
call fcn.0040ae80
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b9e8
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 0x40ba0e
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 0x40ba34
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 0x40ba5a
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.0041fd66
mov esp, ebp
pop ebp
ret