Function at 0x401220
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x238
mov eax, dword [0x406040]
xor eax, esp
mov dword [esp + 0x234], eax
push esi
push edi
lea eax, [esp + 0x130]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
xorps xmm0, xmm0
lea esi, [esp + 0x130]
movaps xmmword [esp + 0x10], xmm0
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401261
sub esi, ecx
cmp esi, 0x7fffffff
ja 0x40165d
mov eax, 0x16
cmp esi, 0xf
ja 0x4012a9
push esi
lea eax, [esp + 0x134]
mov dword [esp + 0x24], esi
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x2c], 0xf
push eax
call sub.VCRUNTIME140.dll_memcpy
mov byte [esp + esi + 0x1c], 0
jmp 0x401335
mov edi, esi
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x4012e1
mov ecx, 0x80000000
mov edi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.00402dca
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4013f1
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x40130e
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x4012fd
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401662
jmp 0x4012c3
test eax, eax
je 0x40130c
push eax
call fcn.00402dca
add esp, 4
jmp 0x40130e
xor eax, eax
push esi
lea ecx, [esp + 0x134]
mov dword [esp + 0xc], eax
push ecx
push eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x14]
mov byte [eax + esi], 0
mov edx, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x20]
mov eax, edx
sub eax, ecx
push 0xa
cmp eax, 0xa
jb 0x401378
cmp edx, 0xf
lea esi, [esp + 0x14]
lea eax, [ecx + 0xa]
cmova esi, dword [esp + 0x14]
add esi, ecx
mov dword [esp + 0x24], eax
push str.script.bat
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0xa], 0
lea eax, [esp + 0x10]
jmp 0x40138d
push ecx
mov byte [esp + 0x14], 0
lea ecx, [esp + 0x18]
push dword [esp + 0x14]
push 0xa
call fcn.00402b00
mov dword [esp + 0x70], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x60], xmm0
mov dword [esp + 0x74], 0
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x60], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [esp + 0x70], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov ecx, dword [esp + 0x24]
cmp ecx, 0xf
jbe 0x401401
mov edx, dword [esp + 0x10]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4013f7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4013f7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402dfa
add esp, 8
push 0xb0
lea eax, [esp + 0x84]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
cmp dword [esp + 0x80], 0xf
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x8c]
cmova eax, dword [esp + 0x6c]
push eax
call fcn.004024b0
mov eax, dword [esp + 0x80]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x80], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x80]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x7c], eax
lea ecx, [esp + 0x80]
call fcn.004026a0
lea ecx, [esp + 0x84]
call fcn.00402420
test eax, eax
jne 0x40148f
push eax
mov eax, dword [esp + 0x84]
lea ecx, [esp + 0x84]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [esp + 0x70]
mov eax, 0x7fffffff
sub eax, ecx
mov dword [esp + 0xc], ecx
cmp eax, 0xb
jb 0x401667
cmp dword [esp + 0x74], 0xf
lea eax, [esp + 0x60]
lea edx, [ecx + 0xb]
mov dword [esp + 0x50], 0
cmova eax, dword [esp + 0x60]
lea edi, [esp + 0x40]
mov esi, 0xf
mov dword [esp + 0x3c], eax
mov dword [esp + 0x54], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
mov dword [esp + 8], edx
cmp edx, esi
jbe 0x401564
mov esi, edx
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x401523
mov ecx, 0x80000000
mov esi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.00402dca
add esp, 4
test eax, eax
je 0x401635
mov ecx, dword [esp + 0xc]
lea edi, [eax + 0x23]
mov edx, dword [esp + 8]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x401560
cmp esi, 0x16
mov eax, 0x16
cmovb esi, eax
lea eax, [esi + 1]
cmp eax, 0x1000
jb 0x401545
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40166c
jmp 0x4014ff
test eax, eax
je 0x40155e
push eax
call fcn.00402dca
mov ecx, dword [esp + 0x10]
add esp, 4
mov edx, dword [esp + 8]
mov edi, eax
jmp 0x401560
xor edi, edi
mov dword [esp + 0x40], edi
movq xmm0, qword [str.cmd.exe__C]
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], esi
movq qword [edi], xmm0
mov ax, word [0x404350]
mov word [edi + 8], ax
mov al, byte [0x404352]
push ecx
push dword [esp + 0x40]
mov byte [edi + 0xa], al
lea eax, [edi + 0xb]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x14]
add esp, 0xc
mov byte [edi + eax], 0
lea eax, [esp + 0x40]
cmp dword [esp + 0x54], 0xf
push 0
cmova eax, dword [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
mov ecx, dword [esp + 0x54]
cmp ecx, 0xf
jbe 0x4015ec
mov edx, dword [esp + 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4015e2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401635
push ecx
push edx
call fcn.00402dfa
add esp, 8
lea ecx, [esp + 0x80]
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0xf
mov byte [esp + 0x40], 0
call fcn.00401680
mov ecx, dword [esp + 0x74]
cmp ecx, 0xf
jbe 0x401645
mov edx, dword [esp + 0x60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40163b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40163b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402dfa
add esp, 8
mov ecx, dword [esp + 0x23c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00402dbc
mov esp, ebp
pop ebp
ret 0x10
call fcn.00401170
call fcn.004010d0
call fcn.00401170
call fcn.004010d0
int3