Function at 0x40cfe8
Capabilities:
Create process on windows
Delete file
Get comspec environment variable
Query environment variable
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc6c
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x3cd0]
push str.CTmpExec__d_::CTmpExec__
push 1
call fcn.00403a56
xor edi, edi
add esp, 0xc
cmp dword [esi + 0x3cd0], edi
je 0x40d210
cmp dword [0x432378], edi
je 0x40d11e
lea eax, [esi + 0x3fe8]
mov dword [ebp - 8], 0x10
mov dword [ebp - 4], eax
mov ebx, 0x208
push dword [ebp - 4]
push dword [esi + 0x3cd0]
push str.CTmpExec__d_::Delete_DatFile___s__
push 1
call fcn.00403a56
add esp, 0x10
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add dword [ebp - 4], ebx
dec dword [ebp - 8]
jne 0x40d03a
lea eax, [ebp - 0x264]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40d210
lea eax, [ebp - 0x46c]
push ebx
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40d210
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x46c]
push eax
lea eax, [ebp - 0xc6c]
push str.__s___c_del___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push 0x44
lea eax, [ebp - 0x5c]
pop ebx
push ebx
push edi
push eax
call fcn.0040e9b0
add esp, 0x1c
mov dword [ebp - 0x5c], ebx
mov word [ebp - 0x2c], di
push 1
pop eax
push dword [esi + 0x3cd0]
mov dword [ebp - 0x30], eax
push str.CTmpExec__d_::Delete_TmpExec
push eax
call fcn.00403a56
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0xc6c]
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40d210
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
jmp 0x40d20e
lea eax, [esi + 0x6068]
mov dword [ebp - 8], 0x10
mov dword [ebp - 4], eax
mov ebx, 0x104
push dword [ebp - 4]
push dword [esi + 0x3cd0]
push 0x42d720
push 1
call fcn.00403a56
add esp, 0x10
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add dword [ebp - 4], ebx
dec dword [ebp - 8]
jne 0x40d133
lea eax, [ebp - 0x368]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40d210
lea eax, [ebp - 0x160]
push ebx
push eax
push 0x42d718
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40d210
lea eax, [ebp - 0x368]
push eax
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x86c]
push 0x42d704
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x44
lea eax, [ebp - 0x5c]
pop ebx
push ebx
push edi
push eax
call fcn.0040e9b0
add esp, 0x1c
mov dword [ebp - 0x5c], ebx
mov word [ebp - 0x2c], di
push 1
pop eax
push dword [esi + 0x3cd0]
mov dword [ebp - 0x30], eax
push 0x42d6e4
push eax
call fcn.00403a56
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x86c]
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40d210
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
pop edi
pop esi
pop ebx
leave
ret