Function at 0x40fa40
Capabilities:
Create process on windows
Delete file
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3f4
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, 0xc3
xor eax, eax
lea edi, [ebp - 0x3f4]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, 0x11
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x128]
mov dword [ebp - 0x54], 0x44
test al, 0x80
je 0x40fb21
test al, 0x20
mov eax, dword [esi + 0x50]
push eax
jne 0x40fa98
lea ecx, [ebp - 0x3f4]
push ecx
call fcn.00418efb
add esp, 8
jmp 0x40fabb
push eax
lea edx, [ebp - 0x3f4]
push str._s__DEL__s
push edx
call fcn.00418efb
mov eax, dword [esi + 0x128]
add esp, 0x10
and al, 0xdf
mov dword [esi + 0x128], eax
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x54]
push eax
push ecx
push 0
push 0
push 0x4000000
push 1
push 0
lea edx, [ebp - 0x3f4]
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40faf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
mov eax, dword [ebp - 0xc]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x40fb17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [esi + 0x128], 0x40
je 0x40fc4b
push str.FOR_DEFAULT_PRINT_DEVICE
call fcn.004191a4
mov edi, eax
add esp, 4
test edi, edi
jne 0x40fb46
mov edi, 0x42d4ec
lea edx, [ebp - 0xe8]
mov dword [ebp - 0xe8], 0x94
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebp - 0xd8]
push edi
cmp eax, 1
jne 0x40fb7b
mov eax, dword [esi + 0x50]
lea ecx, [ebp - 0x3f4]
push eax
push str.Command.com__C_COPY___s___s
push ecx
jmp 0x40fb8b
mov edx, dword [esi + 0x50]
lea eax, [ebp - 0x3f4]
push edx
push str.Cmd.exe__C_COPY___s___s
push eax
call fcn.00418efb
add esp, 0x10
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x54]
lea eax, [ebp - 0x3f4]
push ecx
push edx
push 0
push 0
push 0x4000000
push 1
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40fbd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
jmp 0x40fc4b
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40fbf1
call edi
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
mov edx, dword [ebp - 0x10]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x40fc0f
call edi
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40fc2a
call edi
mov dword [esi + 0xac], eax
mov ebx, 0xc000001c
mov eax, dword [esi + 0x128]
test al, 0x20
je 0x40fc4b
mov ecx, dword [esi + 0xac]
test ecx, ecx
je 0x40fc4b
and al, 0xdf
mov ebx, 0x40000005
mov dword [esi + 0x128], eax
mov eax, dword [esi + 0x128]
test al, 0x20
je 0x40fc7f
test al, 0x10
jne 0x40fc7f
mov ecx, dword [esi + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40fc7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
pop edi
pop esi
mov eax, 0xc000001c
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret