Function at 0x14004e090
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push r15
sub rsp, 0x470
mov rax, qword [0x1401807c0]
xor rax, rsp
mov qword [rsp + 0x468], rax
xor r14d, r14d
mov esi, r14d
mov dword [rsp + 0xd0], r14d
lea rcx, str.USERNAME
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x14002fa47
xorps xmm0, xmm0
movups xmmword [rsp + 0xb0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0xc0], xmm1
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rax + r8], 0
jne 0x14002f274
mov rdx, rax
lea rcx, [rsp + 0xb0]
call fcn.140001c50
nop
mov r9d, 9
lea r8, str.C:Users_
xor edx, edx
lea rcx, [rsp + 0xb0]
call fcn.140011ba0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x50], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rax], 0
or esi, 1
mov r8d, 0x50
lea rdx, str.AppDataRoamingMicrosoftWindowsPowerShellPSReadLineConsoleHost_history.txt
lea rcx, [rsp + 0x40]
call fcn.140004b80
xorps xmm0, xmm0
movups xmmword [rsp + 0xf8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x108], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0xf8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x108], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rax], 0
or esi, 2
lea rcx, [rsp + 0x40]
call fcn.140004b20
nop
lea rcx, [rsp + 0xb0]
call fcn.140004b20
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
movdqa xmm1, xmmword [0x14015ff70]
movdqu xmmword [rsp + 0x30], xmm1
mov word [rsp + 0x20], r14w
movups xmmword [rsp + 0xd8], xmm0
movdqu xmmword [rsp + 0xe8], xmm1
mov word [rsp + 0xd8], r14w
lea rcx, [rsp + 0xf8]
cmp qword [rsp + 0x110], 0xf
cmova rcx, qword [rsp + 0xf8]
lea rdx, [rsp + 0x250]
call qword [sym.imp.MSVCP140.dll__To_wide]
test eax, eax
jne 0x14002f3bd
lea rcx, str.invalid_char_filename_argument
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_]
lea rax, [rsp + 0x250]
mov r8, rbx
nop dword [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x14002f3d0
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0xd8]
call fcn.14001ffe0
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140030af0
nop
lea rcx, [rsp + 0xd8]
call fcn.140004ab0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 7
cmova rcx, qword [rsp + 0x20]
lea rdx, [rsp + 0xd0]
call qword [sym.imp.MSVCP140.dll__Stat]
cmp eax, 8
je 0x14002fa75
cmp eax, 0xffffffff
je 0x14002fa75
lea rcx, [rsp + 0x20]
call fcn.140004ab0
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
movdqa xmm1, xmmword [0x14015ff70]
movdqu xmmword [rsp + 0x30], xmm1
mov word [rsp + 0x20], r14w
movups xmmword [rsp + 0xd8], xmm0
movdqu xmmword [rsp + 0xe8], xmm1
mov word [rsp + 0xd8], r14w
lea rcx, [rsp + 0xf8]
cmp qword [rsp + 0x110], 0xf
cmova rcx, qword [rsp + 0xf8]
lea rdx, [rsp + 0x250]
call qword [sym.imp.MSVCP140.dll__To_wide]
test eax, eax
jne 0x14002f4b6
lea rcx, str.invalid_char_filename_argument
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_]
lea rax, [rsp + 0x250]
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x14002f4c0
mov r8, rbx
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0xd8]
call fcn.14001ffe0
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140030af0
nop
lea rcx, [rsp + 0xd8]
call fcn.140004ab0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 7
cmova rcx, qword [rsp + 0x20]
call qword [sym.imp.MSVCP140.dll__Last_write_time]
mov rdi, rax
lea rcx, [rsp + 0x20]
cmp rax, 0xffffffffffffffff
jne 0x14002f53b
call fcn.140004ab0
nop
lea rcx, [rsp + 0xf8]
call fcn.140004b20
jmp 0x14002fa47
call fcn.140004ab0
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
sub rdi, rax
add rdi, rbx
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
imul rbx, rax, 0x2710
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
sub rax, rbx
mov ebx, 1
cmp rdi, rax
jne 0x14002f579
xor al, al
jmp 0x14002f581
mov eax, 0xff
cmovge eax, ebx
test al, al
jle 0x14002fa39
movabs rax, 0xd6bf94d5e57a42bd
imul rdi
add rdx, rdi
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [rsp + 0x118], rdx
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x250]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x1401564f0]
mov qword [rsp + 0x250], rax
lea rax, [0x140152430]
mov qword [rsp + 0x260], rax
lea rcx, [rsp + 0x2e8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
or esi, 4
mov dword [rsp + 0xd0], esi
xor r8d, r8d
lea rdx, [rsp + 0x268]
lea rcx, [rsp + 0x250]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
nop
mov rax, qword [rsp + 0x250]
movsxd rcx, dword [rax + 4]
lea r15, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x250], r15
mov rax, qword [rsp + 0x250]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x24c], edx
lea rcx, [rsp + 0x268]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rsi, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + 0x268], rsi
mov qword [rsp + 0x2d0], r14
mov dword [rsp + 0x2d8], r14d
lea rdx, str.Last_Powershell_Command_:
lea rcx, [rsp + 0x260]
call fcn.140026750
mov rdi, rax
lea rcx, [rsp + 0x118]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
mov qword [rsp + 0x20], rax
lea rcx, [0x140152118]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rcx
inc rcx
mov qword [rsp + 0x30], rcx
cmp byte [rcx], 0
jne 0x14002f6b1
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.140005bf0
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0x268]
call fcn.140004a00
nop
xor edx, edx
mov r8d, 0xe8
lea rcx, [rsp + 0x160]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x160]
call fcn.140004180
nop
lea rcx, [rsp + 0x118]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
mov qword [rsp + 0x20], rax
lea rax, str._Y__m__dT_H:_M:_SZ
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
nop dword [rax + rax]
inc rax
mov qword [rsp + 0x30], rax
cmp byte [rax], 0
jne 0x14002f730
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x160]
call fcn.140005bf0
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x168]
call fcn.140004a00
nop
call fcn.140002420
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x68], r14d
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movdqa xmm1, xmmword [0x14015ff90]
movdqa xmmword [rsp + 0x80], xmm1
mov byte [rsp + 0x70], 0
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x90]
call fcn.140004250
nop
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0x40]
call fcn.140004250
nop
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.140004b80
nop
lea rcx, [rsp + 0x40]
call fcn.140004b20
nop
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x90]
mov edx, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
call fcn.1400025b0
lea rcx, [rsp + 0x90]
call fcn.140004b20
lea rcx, [rsp + 0x70]
call fcn.140004b20
nop
lea rcx, [rsp + 0xf8]
call fcn.14002ee40
test al, al
je 0x14002f93c
call fcn.140002420
mov rdi, rax
xorps xmm0, xmm0
movups xmmword [rsp + 0xd8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0xe8], xmm1
mov r8d, 3
lea rdx, [0x140152114]
lea rcx, [rsp + 0xd8]
call fcn.140001c50
nop
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x68], ebx
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movdqa xmm1, xmmword [0x14015ff90]
movdqa xmmword [rsp + 0x80], xmm1
mov byte [rsp + 0x70], 0
lea rdx, [rsp + 0xd8]
lea rcx, [rsp + 0x90]
call fcn.140004250
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x30], xmm1
mov r8d, reloc.WLDAP32.dll_Ordinal_27
lea rdx, str.Powershell_History_Modified
lea rcx, [rsp + 0x20]
call fcn.140001c50
nop
lea rdx, [rsp + 0x20]
cmp qword [rsp + 0x38], 0xf
cmova rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x30]
lea rcx, [rsp + 0x70]
call fcn.140004b80
nop
lea rcx, [rsp + 0x20]
call fcn.140004b20
nop
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x90]
mov edx, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
call fcn.1400025b0
lea rcx, [rsp + 0x90]
call fcn.140004b20
lea rcx, [rsp + 0x70]
call fcn.140004b20
nop
lea rcx, [rsp + 0xd8]
call fcn.140004b20
nop
lea rcx, [rsp + 0x120]
call fcn.140004b20
nop
mov rax, qword [rsp + 0x160]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x160], rax
mov rax, qword [rsp + 0x160]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x15c], edx
mov qword [rsp + 0x168], rsi
lea rcx, [rsp + 0x168]
call fcn.140004950
lea rcx, [rsp + 0x168]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x1e8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x140]
call fcn.140004b20
nop
mov rax, qword [rsp + 0x250]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x250], r15
mov rax, qword [rsp + 0x250]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x24c], edx
mov qword [rsp + 0x268], rsi
lea rcx, [rsp + 0x268]
call fcn.140004950
lea rcx, [rsp + 0x268]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x270]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x2e8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0xf8]
call fcn.140004b20
nop
mov rcx, qword [rsp + 0x468]
xor rcx, rsp
call fcn.14011ab50
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop r15
ret
lea rcx, [rsp + 0x20]
call fcn.140004ab0
nop
lea rcx, [rsp + 0xf8]
call fcn.140004b20
jmp 0x14002fa47
jmp 0x14002f200