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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4043b6
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1d0
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x120]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x1e0]
call fcn.00402b70
mov edi, eax
mov dword [ebp - 4], 0
mov edx, dword [edi + 0x14]
mov eax, edx
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 0xe
jb 0x4016f5
lea eax, [ecx + 0xe]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0x10
jb 0x4016dc
mov eax, dword [edi]
push 0xe
lea esi, [eax + ecx]
push str.tempScript.ps1
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0xe], 0
jmp 0x401714
push 0xe
push str.tempScript.ps1
mov byte [ebp - 0x194], 0
mov ecx, edi
push dword [ebp - 0x194]
push 0xe
call fcn.00403300
mov edi, eax
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x138], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x128], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x1cc]
cmp ecx, 0x10
jb 0x40177c
mov edx, dword [ebp - 0x1e0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401772
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401772
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004035fa
add esp, 8
mov edx, dword [ebp - 0x128]
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x13e], ax
mov word [ebp - 0x150], ax
mov eax, 0x7fffffff
sub eax, edx
mov dword [ebp - 0x1d0], 0
mov dword [ebp - 0x1cc], 0xf
mov byte [ebp - 0x1e0], 0
movlpd qword [ebp - 0x17c], xmm0
movlpd qword [ebp - 0x174], xmm0
movlpd qword [ebp - 0x16c], xmm0
movlpd qword [ebp - 0x164], xmm0
movlpd qword [ebp - 0x15c], xmm0
movlpd qword [ebp - 0x14e], xmm0
movlpd qword [ebp - 0x146], xmm0
mov dword [ebp - 0x180], 0x44
mov dword [ebp - 0x154], 1
cmp eax, 0x2e
jb 0x401b34
cmp dword [ebp - 0x124], 0x10
lea eax, [ebp - 0x138]
lea ecx, [edx + 0x2e]
mov dword [ebp - 0x1a0], 0
cmovae eax, dword [ebp - 0x138]
lea edi, [ebp - 0x1b0]
mov esi, 0xf
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x19c], 0
mov dword [ebp - 0x194], ecx
movups xmmword [ebp - 0x1b0], xmm0
cmp ecx, esi
jbe 0x4018e5
mov esi, ecx
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x40189f
mov ecx, 0x80000000
mov esi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.004035ca
add esp, 4
test eax, eax
je 0x401aa0
mov ecx, dword [ebp - 0x194]
lea edi, [eax + 0x23]
mov edx, dword [ebp - 0x128]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x4018df
mov eax, 0x16
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
cmp eax, 0x1000
jb 0x4018c0
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401b39
jmp 0x401877
test eax, eax
je 0x4018dd
push eax
call fcn.004035ca
mov ecx, dword [ebp - 0x194]
add esp, 4
mov edx, dword [ebp - 0x128]
mov edi, eax
jmp 0x4018df
xor edi, edi
mov dword [ebp - 0x1b0], edi
movups xmm0, xmmword [str.powershell.exe__ExecutionPolicy_Bypass__File__]
mov dword [ebp - 0x1a0], ecx
mov dword [ebp - 0x19c], esi
movups xmmword [edi], xmm0
push edx
movups xmm0, xmmword [0x405d20]
push dword [ebp - 0x198]
movups xmmword [edi + 0x10], xmm0
movq xmm0, qword [0x405d30]
movq qword [edi + 0x20], xmm0
mov eax, dword [0x405d38]
mov dword [edi + 0x28], eax
mov ax, word [0x405d3c]
mov word [edi + 0x2c], ax
lea eax, [edi + 0x2e]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x128]
add esp, 0xc
mov byte [edi + eax + 0x2e], 0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x19c]
mov eax, edx
mov ecx, dword [ebp - 0x1a0]
sub eax, ecx
cmp eax, 1
jb 0x401983
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [ebp - 0x1a0], eax
lea eax, [ebp - 0x1b0]
cmovae eax, dword [ebp - 0x1b0]
mov word [eax + ecx], 0x22
lea eax, [ebp - 0x1b0]
jmp 0x4019a4
push 1
push 0x405d0c
mov byte [ebp - 0x198], 0
lea ecx, [ebp - 0x1b0]
push dword [ebp - 0x198]
push 1
call fcn.00403300
mov dword [ebp - 0x1b8], 0
lea ecx, [ebp - 0x190]
push ecx
mov dword [ebp - 0x1b4], 0
lea ecx, [ebp - 0x180]
push ecx
xorps xmm0, xmm0
movups xmmword [ebp - 0x1c8], xmm0
push 0
movups xmm0, xmmword [eax]
push 0
push 0
movups xmmword [ebp - 0x1c8], xmm0
push 0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x1b8], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x1c8]
cmp dword [ebp - 0x1b4], 0x10
push 0
cmovae eax, dword [ebp - 0x1c8]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [ebp - 0x1b4]
mov esi, eax
cmp ecx, 0x10
jb 0x401a59
mov edx, dword [ebp - 0x1c8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401a4f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401aa0
push ecx
push edx
call fcn.004035fa
add esp, 8
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x1b8], 0
mov dword [ebp - 0x1b4], 0xf
mov byte [ebp - 0x1c8], 0
cmp ecx, 0x10
jb 0x401ab0
mov edx, dword [ebp - 0x1b0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401aa6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401aa6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004035fa
add esp, 8
test esi, esi
je 0x401ad8
push 0xffffffffffffffff
push dword [ebp - 0x190]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x190]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x18c]
call esi
mov eax, dword [ebp - 0x124]
cmp eax, 0x10
jb 0x401b16
mov edx, dword [ebp - 0x138]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x401b0c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401b0c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004035fa
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004035bc
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00401170
call fcn.004010d0
int3