Function at 0x401fd0
Capabilities:
Create service
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403188
push 0x402630
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x370
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x328]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
mov cl, byte [0x404124]
push ecx
lea edx, [ebp - 0x220]
push edx
call section..text
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea eax, [ebp - 0x328]
push eax
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0x14
test eax, eax
je 0x402178
push 0x50
lea edx, [ebp - 0x380]
push edx
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.comdlg32.dll_GetFileTitleA]
push str..exe
lea ecx, [ebp - 0x380]
push ecx
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
call esi
add esp, 8
test eax, eax
jne 0x4020c2
push str..EXE
lea edx, [ebp - 0x380]
push edx
call esi
add esp, 8
test eax, eax
jne 0x4020c2
lea edx, [ebp - 0x380]
mov edi, str..exe
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [ebp - 0x220]
mov edi, 0x4042cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x380]
lea edx, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x328]
push ecx
call dword [0x40305c]
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x328]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x220]
lea edx, [ebp - 0x328]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [0x4044ac], 1
xor ebx, ebx
push 6
lea ecx, [ebp - 0x328]
push ecx
call dword [0x403058]
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 esi, eax
mov dword [ebp - 0x32c], esi
test esi, esi
je 0x4022cf
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x328]
push edx
push 0
push 2
push 0x10
push 0xf01ff
mov eax, dword [ebp + 0xc]
push eax
mov edi, dword [ebp + 8]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
mov dword [ebp - 0x330], ebx
test ebx, ebx
jne 0x402225
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x431
jne 0x402225
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
mov dword [ebp - 0x330], ebx
test ebx, ebx
je 0x4022cf
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x4022cf
lea edx, [ebp - 0x11c]
mov edi, str.SYSTEMCurrentControlSetServices_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [ebp - 0x11c]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x11c]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, dword [ebp + 0x10]
push esi
call dword [0x4030a0]
push eax
push esi
push 1
push 0
push str.Description
mov edx, dword [ebp - 0x224]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, dword [ebp - 0x32c]
mov dword [ebp - 4], 0xffffffff
call fcn.004022f8
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret