Function at 0x140667240
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r15, r8
mov rbx, rdx
mov r14, rcx
mov rax, qword [0x1406d5b28]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rcx, qword [0x140713280]
test rcx, rcx
jne 0x14066729a
lea rcx, [0x1406bff6d]
call qword [sym.imp.python311.dll_PyImport_ImportModule]
mov rcx, rax
mov qword [0x140713280], rax
test rax, rax
je 0x1406674ce
lea rdx, [0x1406c106c]
call qword [sym.imp.python311.dll_PyObject_GetAttrString]
mov qword [rsp + 0x20], rax
mov rcx, rbx
call qword [sym.imp.python311.dll_PyUnicode_FromString]
mov rdi, rax
test r15, r15
je 0x1406673c5
mov word [rsp + 0x30], 0
movzx esi, byte [rbx]
test sil, sil
je 0x140667367
mov r13d, 0x28
lea rbp, [rsp + 0x30]
xor eax, eax
lea r14, [rsp + 0x2e]
nop word cs:[rax + rax]
mov r12, rbp
mov rcx, r13
test ax, ax
je 0x140667321
mov rcx, r13
mov rax, rbp
nop word cs:[rax + rax]
lea r12, [rax + 2]
dec rcx
cmp word [rax + 2], 0
mov rax, r12
jne 0x140667310
test rcx, rcx
je 0x1406674ce
mov rcx, r12
call fcn.1406a6058
lea rcx, [r12 + rax*2]
mov byte [rsp + 0x2e], sil
mov byte [rsp + 0x2f], 0
mov r8d, 2
mov rdx, r14
call fcn.1406a3f70
movzx esi, byte [rbx + 1]
test sil, sil
je 0x140667367
inc rbx
dec r13
movzx eax, word [rbp + 2]
add rbp, 2
jmp 0x1406672f0
lea rcx, [rsp + 0x30]
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, r15
mov rdx, 0xffffffffffffffff
call qword [sym.imp.python311.dll_PyUnicode_FromWideChar]
mov rbx, rax
mov rsi, qword [rsp + 0x20]
mov rcx, rsi
mov rdx, rdi
mov r8, rax
call qword [sym.imp.python311.dll_PyObject_SetItem]
test eax, eax
jne 0x1406674b8
dec qword [rbx]
jne 0x140667489
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
dec qword [rdi]
jne 0x14066748e
jmp 0x1406674e0
mov word [rsp + 0x30], 0
movzx esi, byte [rbx]
test sil, sil
je 0x140667467
mov r13d, 0x28
lea rbp, [rsp + 0x30]
xor eax, eax
lea r15, [rsp + 0x2e]
nop word [rax + rax]
mov r12, rbp
mov rcx, r13
test ax, ax
je 0x140667421
mov rcx, r13
mov rax, rbp
nop word cs:[rax + rax]
lea r12, [rax + 2]
dec rcx
cmp word [rax + 2], 0
mov rax, r12
jne 0x140667410
test rcx, rcx
je 0x1406674ce
mov rcx, r12
call fcn.1406a6058
lea rcx, [r12 + rax*2]
mov byte [rsp + 0x2e], sil
mov byte [rsp + 0x2f], 0
mov r8d, 2
mov rdx, r15
call fcn.1406a3f70
movzx esi, byte [rbx + 1]
test sil, sil
je 0x140667467
inc rbx
dec r13
movzx eax, word [rbp + 2]
add rbp, 2
jmp 0x1406673f0
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rsi, qword [rsp + 0x20]
mov rcx, rsi
mov rdx, rdi
call qword [sym.imp.python311.dll_PyObject_DelItem]
test eax, eax
jne 0x1406674d3
dec qword [rdi]
je 0x1406674e0
dec qword [rsi]
je 0x1406674ef
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140695180
nop
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 1
call qword [sym.imp.python311.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python311.dll_Py_Exit]
call fcn.1406a3c24
mov rcx, r14
call fcn.140022190
dec qword [rdi]
jne 0x14066748e
mov rax, qword [rdi + 8]
mov rcx, rdi
call qword [rax + 0x30]
dec qword [rsi]
jne 0x140667493
mov rax, qword [rsi + 8]
mov rcx, rsi
call qword [rax + 0x30]
jmp 0x140667493