Function at 0x14001bc80
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov rdi, qword [0x14004add0]
mov rax, qword [rdi]
mov qword [rsp + 0xb8], rax
xor eax, eax
movzx eax, byte [rdx]
mov rbp, rcx
mov r13, rdx
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
cmp al, 0x25
je 0x14001be70
mov rdi, rdx
xor r8d, r8d
test al, al
je 0x14001be87
movabs rcx, 0x3ffffff43ffffff
mov rbx, rdi
jmp 0x14001bd0a
lea edx, [rax - 0x41]
cmp dl, 0x39
ja 0x14001bd12
bt rcx, rdx
jae 0x14001bd12
movzx eax, byte [rbx + 1]
add rbx, 1
test al, al
je 0x14001bd12
cmp al, 0x39
jg 0x14001bcf0
cmp al, 0x2f
jg 0x14001bcfe
mov rsi, rbx
sub rsi, rdi
lea rdx, [rsi - 1]
cmp rdx, 0x7e
ja 0x14001be89
test r8b, r8b
je 0x14001be50
test al, al
je 0x14001bd4b
mov rdx, rdi
lea rcx, [rsp + 0x30]
mov r8, rsi
call sub.msvcrt.dll_memcpy
mov byte [rsp + rsi + 0x30], 0
mov rdi, rax
mov rcx, rdi
call sub.msvcrt.dll_getenv
cmp byte [rbx], 0
mov r12, rax
je 0x14001bea0
test rax, rax
je 0x14001bf57
mov rcx, r12
mov qword [rsp + 0x20], r12
xor r15d, r15d
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x28], rax
mov r13, rax
mov r14, qword [rbp + 0x48]
test r14, r14
jne 0x14001bd98
jmp 0x14001bdcd
mov r14, qword [r14]
test r14, r14
je 0x14001bdcd
lea rbx, [r14 + 0x18]
mov rcx, rbx
call sub.msvcrt.dll_strlen
cmp rsi, rax
jne 0x14001bd90
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x14001bd90
mov r8, rbx
lea rdx, str.Overwriting_variable__s
mov rcx, rbp
call fcn.14000e6e0
lea rdx, [rsi + 0x20]
mov ecx, 1
call sub.msvcrt.dll_calloc
mov rbx, rax
test rax, rax
je 0x14001bf17
lea rcx, [rax + 0x18]
mov r8, rsi
mov rdx, rdi
call sub.msvcrt.dll_memcpy
test r15b, r15b
je 0x14001bf30
test r12, r12
je 0x14001bf72
mov rax, qword [rbp + 0x48]
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r13
mov qword [rbx], rax
mov qword [rbp + 0x48], rbx
xor ebx, ebx
mov rdi, qword [0x14004add0]
mov rax, qword [rsp + 0xb8]
sub rax, qword [rdi]
jne 0x14001c001
mov eax, ebx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx eax, byte [rbx]
cmp al, 0x40
je 0x14001bec5
cmp al, 0x3d
jne 0x14001bf96
lea r12, [rbx + 1]
jmp 0x14001bd68
movzx eax, byte [rdx + 1]
lea rdi, [rdx + 1]
test al, al
je 0x14001be87
mov r8d, 1
jmp 0x14001bcd8
xor esi, esi
mov r8, rsi
lea rdx, str.Bad_variable_name_length___zd___skipping
mov rcx, rbp
call fcn.14000e740
jmp 0x14001be1b
test rax, rax
jne 0x14001bd68
mov r8, rdi
lea rdx, str.Variable__s_import_fail__not_set
mov rcx, rbp
mov ebx, 0x17
call fcn.14000e830
jmp 0x14001be1d
cmp byte [rbx + 1], 0x2d
lea r13, [rbx + 1]
jne 0x14001bfad
cmp byte [r13 + 1], 0
jne 0x14001bfad
xor ecx, ecx
call qword [fcn.1400287d0]
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x20]
mov r8, rax
call fcn.140015870
mov ebx, eax
test ebx, ebx
jne 0x14001be1d
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x20]
mov r15d, 1
jmp 0x14001bd80
test r15b, r15b
jne 0x14001bf7a
mov ebx, 0xf
jmp 0x14001be1d
lea rcx, [r13 + 1]
call sub.msvcrt.dll_malloc
mov rcx, rax
test rax, rax
je 0x14001c006
test r13, r13
jne 0x14001bf86
mov byte [rcx + r13], 0
mov r12, rcx
jmp 0x14001be08
mov r12, qword [rsp + 0x20]
test r12, r12
je 0x14001be50
mov r13, qword [rsp + 0x28]
xor r15d, r15d
jmp 0x14001bd80
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
jmp 0x14001bf1c
mov r8, r13
mov rdx, r12
call sub.msvcrt.dll_memcpy
mov rcx, rax
jmp 0x14001bf4a
mov r8, r13
lea rdx, str.Bad___variable_syntax__skipping:__s
mov rcx, rbp
call fcn.14000e740
jmp 0x14001be1b
lea rdx, [0x14004a133]
mov rcx, r13
call fcn.14001c6d0
mov r12, rax
test rax, rax
je 0x14001bfe5
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov r8, rax
call fcn.140015870
mov rcx, r12
mov ebx, eax
call sub.msvcrt.dll_fclose
jmp 0x14001befa
mov r8, r13
lea rdx, str.Failed_to_open__s
mov rcx, rbp
mov ebx, 0x16
call fcn.14000e830
jmp 0x14001be1d
call fcn.14001e3f0
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x14001bf1c