Function at 0x40e95c
Capabilities:
Create process on windows
Create thread
Get common file path
Get comspec environment variable
Manipulate console buffer
Query environment variable
Terminate process
Terminate thread
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd60
push ebx
push esi
xor eax, eax
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x298], eax
mov dword [ebp - 4], eax
mov ebx, 0x491d08
xor eax, eax
push ebp
push 0x40ed8c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebx], 1
call fcn.00405260
fmul dword [0x40ed9c]
fstp qword [ebp - 0x10]
wait
fld qword [ebp - 0x10]
call fcn.0040284c
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
lea edx, [ebx + 8]
mov eax, 2
call fcn.004027c0
mov edx, 0x493c78
mov eax, 3
call fcn.004027c0
mov eax, dword [0x493c78]
call fcn.00403c0c
test eax, eax
jle 0x40ea1f
mov eax, dword [0x493c78]
cmp byte [eax], 0x22
jne 0x40ea1f
mov eax, dword [0x493c78]
call fcn.00403c0c
mov edx, dword [0x493c78]
cmp byte [edx + eax - 1], 0x22
jne 0x40ea1f
push 0x493c78
mov eax, dword [0x493c78]
call fcn.00403c0c
mov ecx, eax
sub ecx, 2
mov edx, 2
mov eax, dword [0x493c78]
call fcn.00403e64
push dword [ebp - 0x14]
push dword [ebp - 0x18]
lea eax, [ebp - 0x298]
call fcn.00404c98
mov ecx, dword [ebp - 0x298]
lea eax, [ebx + 4]
mov edx, 0x40eda8
call fcn.00403c58
lea edx, [ebp - 0x28]
mov eax, dword [ebx + 4]
call fcn.00405e1c
test al, al
je 0x40ed66
push 0x8000
push 0
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_VirtualFree_1
mov eax, dword [0x491ac0]
mov dword [ebx + 0x10], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
mov eax, dword [ebx + 8]
call fcn.00403e0c
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
mov dword [ebx + 0xc], esi
cmp esi, 0xffffffff
je 0x40ed5d
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebx + 4]
call fcn.00403c0c
push eax
lea eax, [ebx + 4]
call fcn.00403e5c
push eax
push esi
call sub.kernel32.dll_WriteFile_1
call sub.kernel32.dll_AllocConsole
push 0xfffffffffffffff6
call sub.kernel32.dll_GetStdHandle_1
mov dword [ebx + 0x14], eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
mov dword [ebx + 0x18], eax
mov word [ebx + 0x1c], 0x50
mov word [ebx + 0x1e], 0x19
push dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
push eax
call sub.kernel32.dll_SetConsoleScreenBufferSize
mov word [ebx + 0x24], 0
mov word [ebx + 0x26], 0
mov word [ebx + 0x28], 0x4f
mov word [ebx + 0x2a], 0x18
lea eax, [ebx + 0x24]
push eax
push 0xffffffffffffffff
mov eax, dword [ebx + 0x18]
push eax
call sub.kernel32.dll_SetConsoleWindowInfo
push 0
push 0x404a64
call sub.kernel32.dll_SetConsoleCtrlHandler
push 0xffffffffffffffff
push 0x40e5b8
call sub.kernel32.dll_SetConsoleCtrlHandler
push 0
push 0
call sub.kernel32.dll_SetConsoleCtrlHandler
lea eax, [ebx + 0x2c]
mov edx, 0x1f40
xor ecx, ecx
call fcn.00402c24
mov word [ebx + 0x20], 0
mov word [ebx + 0x22], 0
lea eax, [ebx + 0x24]
push eax
push dword [ebx + 0x20]
push dword [ebx + 0x1c]
lea eax, [ebx + 0x2c]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.kernel32.dll_WriteConsoleOutputA
push dword [ebx + 0x20]
mov eax, dword [ebx + 0x18]
push eax
call sub.kernel32.dll_SetConsoleCursorPosition
push 0x105
lea eax, [ebp - 0x181]
push eax
push 0x40edc0
call sub.kernel32.dll_GetEnvironmentVariableA
lea eax, [ebp - 0x286]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
lea eax, [ebp - 4]
lea edx, [ebp - 0x286]
mov ecx, 0x105
call fcn.00403bf4
lea eax, [ebp - 4]
call fcn.00405634
lea eax, [ebp - 4]
mov edx, dword [0x493c78]
call fcn.00403c14
mov eax, dword [ebp - 4]
call fcn.00405390
test al, al
je 0x40ebd5
mov eax, dword [ebp - 4]
call fcn.004052b0
lea eax, [ebp - 0x29c]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bf4
mov eax, dword [ebp - 0x29c]
mov cl, 1
mov edx, dword [ebp - 4]
call fcn.00405314
mov eax, dword [ebp - 4]
call fcn.00405390
test al, al
jne 0x40ec1a
lea eax, [ebp - 4]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bf4
lea eax, [ebp - 0x7c]
mov edx, 0x44
xor ecx, ecx
call fcn.00402c24
xor eax, eax
mov dword [ebx + 0x1f6c], eax
mov dword [ebp - 0x7c], 0x44
mov dword [ebp - 0x50], 1
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403e0c
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40ec79
mov eax, dword [ebp - 0x38]
mov dword [ebx + 0x1f6c], eax
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebx + 0x1f6c], 0
je 0x40ed17
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0x40e5c4
push 0
push 0
call sub.kernel32.dll_CreateThread
mov esi, eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0x40e830
push 0
push 0
call sub.kernel32.dll_CreateThread
test esi, esi
je 0x40ed17
test eax, eax
je 0x40ed17
mov edx, dword [ebx + 0x1f6c]
mov dword [ebp - 0x294], edx
mov dword [ebp - 0x290], esi
mov dword [ebp - 0x28c], eax
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x294]
push eax
push 3
call sub.kernel32.dll_WaitForMultipleObjects
mov byte [ebx], 0
push 0
mov eax, dword [ebx + 0x1f6c]
push eax
call sub.kernel32.dll_TerminateProcess
mov eax, 0x12c
call fcn.00405044
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_TerminateThread
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_TerminateThread
mov eax, 0x12c
call fcn.00405044
lea eax, [ebp - 0x2a0]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bf4
mov eax, dword [ebp - 0x2a0]
mov edx, dword [ebp - 4]
call fcn.00403d58
je 0x40ed4f
mov eax, dword [ebp - 4]
call fcn.004052b0
mov eax, dword [ebx + 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
call sub.kernel32.dll_FreeConsole
mov eax, dword [ebx + 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ed93
lea eax, [ebp - 0x2a0]
mov edx, 3
call fcn.00403aac
lea eax, [ebp - 4]
call fcn.00403a88
ret