Function at 0x140001230
Capabilities:
Patch process command line

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x680]
sub rsp, 0x780
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x670], rax
mov ebx, edx
mov r15, rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 1
xor r12d, r12d
mov dword [rbp + 0x668], r12d
mov qword [rbp + 0x660], r12
xor edx, edx
mov r8d, 0x3f8
lea rcx, [rbp + 0x260]
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movups xmmword [r15], xmm1
mov qword [r15], r12
mov qword [r15 + 8], r12
mov qword [r15 + 0x10], r12
mov dword [rsp + 0x50], 1
xor edx, edx
mov r8d, 0x2c8
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
mov edx, ebx
lea rcx, str.____Attempting_to_get_env_vars_for_process_pid__u_n
call fcn.140001010
mov r8d, ebx
xor edx, edx
mov ecx, 0x1010
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
jne 0x140001312
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._Was_unable_to_get_access_to_the_process._Error:__u_n
call fcn.140001010
jmp 0x1400016da
lea rcx, str.___Opened_a_handle_to_the_process_with_debug_privileges__n
call fcn.140001010
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400016bc
lea rdx, str.NtQueryInformationProcess
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp + 0x668]
mov qword [rsp + 0x20], rcx
mov r9d, 0x30
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, r14
call rax
test eax, eax
je 0x14000137d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str._Was_unable_to_call_NtQueryInformationProcess._Error:__u_n
jmp 0x1400016c9
lea rcx, str.___Called_NtQueryInformationProcess_and_got_the_PBI_of_the_process__n
call fcn.140001010
mov rdx, qword [rsp + 0x68]
test rdx, rdx
jne 0x1400013a4
lea rcx, str._pbi.PebBaseAddress_is_0__bailing_out._n
call fcn.140001010
jmp 0x1400016d0
lea rax, [rbp + 0x660]
mov qword [rsp + 0x20], rax
mov r9d, 0x2c8
lea r8, [rbp - 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rdx, qword [rbp + 0x660]
test rdx, rdx
jne 0x1400013e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str._Was_unable_to_read_process_memory_and_clone_peb._Error:__u_n
jmp 0x1400016c9
lea rcx, str.___Read__zu_bytes_from_the_process_and_cloned_the_PEB__n
call fcn.140001010
lea rax, [rbp + 0x660]
mov qword [rsp + 0x20], rax
mov r9d, 0x3f8
lea r8, [rbp + 0x260]
mov rdx, qword [rbp - 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rdx, qword [rbp + 0x660]
test rdx, rdx
jne 0x140001431
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str._Was_unable_to_read_process_memory_and_clone_upp._Error:__u_n
jmp 0x1400016c9
lea rcx, str.___Read__zu_bytes_from_the_process_and_cloned_the_UPP__n
call fcn.140001010
mov rdi, qword [rbp + 0x2e0]
mov ebx, dword [rbp + 0x650]
mov ecx, ebx
shr ecx, 1
inc ecx
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140002c04
mov rsi, rax
lea rax, [rbp + 0x660]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8, rsi
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp qword [rbp + 0x660], 0
jne 0x1400014a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str._Was_unable_to_read_process_memory_and_clone_environment_variables._Error:__u_n
jmp 0x1400016c9
shr rbx, 1
mov word [rsi + rbx*2], r12w
mov rdx, qword [rbp + 0x660]
lea rcx, str.___Read__zu_bytes_from_the_process_and_got_the_environment__n
call fcn.140001010
cmp word [rsi], 0
je 0x1400016da
movabs r13, 0x7ffffffffffffffe
movabs r14, 0x7fffffffffffffff
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
lea rdx, [0x1400047d8]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
jne 0x140001695
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rsi + rbx*2], 0
jne 0x140001530
cmp rbx, r13
ja 0x140001707
mov qword [rsp + 0x48], 7
cmp rbx, 7
ja 0x140001575
mov qword [rsp + 0x40], rbx
add rbx, rbx
mov r8, rbx
mov rdx, rsi
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memcpy
mov word [rsp + rbx + 0x30], r12w
jmp 0x14000161d
mov rdi, rbx
or rdi, 7
cmp rdi, r13
jbe 0x14000158a
mov rdi, r13
lea rcx, [r14 + r14]
jmp 0x1400015b0
cmp rdi, 0xa
mov eax, 0xa
cmovb rdi, rax
lea rcx, [rdi + 1]
cmp rcx, r14
ja 0x14000170d
add rcx, rcx
cmp rcx, 0x1000
jb 0x1400015dc
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000170d
mov rcx, rax
call fcn.140002bc0
test rax, rax
je 0x1400016b5
lea r14, [rax + 0x27]
and r14, 0xffffffffffffffe0
mov qword [r14 - 8], rax
jmp 0x1400015ee
test rcx, rcx
je 0x1400015eb
call fcn.140002bc0
mov r14, rax
jmp 0x1400015ee
mov r14, r12
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rdi
add rbx, rbx
mov r8, rbx
mov rdx, rsi
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
mov word [r14 + rbx], r12w
movabs r14, 0x7fffffffffffffff
mov rdx, qword [r15 + 8]
cmp rdx, qword [r15 + 0x10]
je 0x14000164a
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rdx + 0x10], xmm1
mov edx, 7
mov word [rsp + 0x30], r12w
add qword [r15 + 8], 0x20
jmp 0x14000165c
lea r8, [rsp + 0x30]
mov rcx, r15
call fcn.1400028c0
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140001695
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001690
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400016b5
call fcn.140002bfc
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
lea rsi, [rsi + rcx*2]
add rsi, 2
cmp word [rsi], 0
jne 0x1400014f0
jmp 0x1400016da
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str._Was_unable_to_get_the_module_handle_to_ntdll._Error:__u_n
mov edx, eax
call fcn.140001010
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, r15
mov rcx, qword [rbp + 0x670]
xor rcx, rsp
call fcn.140002ba0
mov rbx, qword [rsp + 0x7d0]
add rsp, 0x780
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140001210
nop
call fcn.140001170
int3