Function at 0x14001f290
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x2048
call fcn.140118430
sub rsp, rax
call fcn.140032090
test rax, rax
je 0x14001f5d5
mov rdi, rax
lea rdx, [0x140123ad7]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
movzx eax, byte [0x1401b08e0]
test rsi, rsi
je 0x14001f5ea
test al, 1
je 0x14001f2f0
lea rcx, str.Defaults_from__s:_n
mov rdx, rdi
call fcn.14001b680
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rsp + 0x1040]
mov edx, 0x1000
mov r8, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x14001f5cc
lea rdi, [0x140123aff]
lea rbx, [rsp + 0x1040]
lea r14, [rsp + 0x28]
mov r15, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok_s]
jmp 0x14001f35a
mov rcx, rbx
mov edx, 0x1000
mov r8, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x14001f5cc
mov rcx, rbx
mov rdx, rdi
mov r8, r14
call r15
test rax, rax
je 0x14001f340
mov r12, rax
movzx eax, byte [rax]
test eax, eax
je 0x14001f340
cmp eax, 0x23
je 0x14001f340
xor ecx, ecx
lea rdx, [0x140123b04]
mov r8, r14
call r15
test rax, rax
je 0x14001f340
mov rbp, rax
mov rdi, rax
dec rdi
jmp 0x14001f3a6
inc rbp
inc rdi
movzx eax, byte [rbp]
cmp eax, 0x20
je 0x14001f3a0
cmp eax, 9
je 0x14001f3a0
mov rcx, rbp
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
test eax, eax
je 0x14001f3e9
movsxd rcx, eax
add rdi, rcx
neg eax
xor ecx, ecx
jmp 0x14001f3db
mov byte [rdi + rcx], 0
dec rcx
cmp eax, ecx
je 0x14001f3e9
movzx edx, byte [rdi + rcx]
cmp edx, 0x20
je 0x14001f3d0
cmp edx, 9
je 0x14001f3d0
mov rcx, rbp
mov edx, 0x24
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x14001f52a
movzx eax, byte [rbp]
mov byte [rsp + 0x30], al
lea r15, [rsp + 0x30]
test al, al
jne 0x14001f43d
jmp 0x14001f52d
mov r13, rbp
movzx eax, byte [r13 + 1]
inc r13
mov byte [r15 + 1], al
inc r15
mov rbp, r13
test al, al
je 0x14001f523
cmp byte [rbp], 0x24
jne 0x14001f420
cmp byte [rbp + 1], 0x7b
jne 0x14001f420
mov rcx, rbp
mov edx, 0x7d
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x14001f420
mov r13, rax
add rbp, 2
mov byte [rax], 0
mov rcx, rbp
mov edx, 0x2d
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x14001f482
mov r14, rax
inc r14
mov byte [rax], 0
jmp 0x14001f485
xor r14d, r14d
mov rcx, rbp
lea rdx, str.RMANTREE
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x14001f4ab
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rdi, rdi
jne 0x14001f4bf
jmp 0x14001f4b7
mov rdi, qword [0x1401b08f0]
test rdi, rdi
jne 0x14001f4bf
mov rdi, r14
test r14, r14
je 0x14001f51b
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r14, rax
cmp r14d, 0x1000
jl 0x14001f50a
mov dword [rsp + 0x20], 0x1000
lea rcx, str.D05666
mov edx, 2
mov r8d, 1
mov r9, rbp
call fcn.14003e350
mov rcx, r15
mov rdx, rbp
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rcx, rbp
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
jmp 0x14001f518
mov rcx, r15
mov rdx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
movsxd rax, r14d
add r15, rax
dec r15
jmp 0x14001f423
lea r15, [rsp + 0x30]
jmp 0x14001f52d
mov r15, rbp
mov rcx, r12
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rdi, rax
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea eax, [rdi + rax + 0x1a]
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r13, rax
test rax, rax
je 0x14001f593
lea rdi, [r13 + 0x18]
mov qword [r13 + 8], rdi
mov rcx, rdi
mov rdx, r12
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rcx, [r13 + rax + 0x19]
mov qword [r13 + 0x10], rcx
mov rdx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov rax, qword [0x1401b08e8]
mov qword [r13], rax
mov qword [0x1401b08e8], r13
cmp byte [0x1401b08e0], 1
lea rdi, [0x140123aff]
lea r14, [rsp + 0x28]
mov r15, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok_s]
jne 0x14001f340
mov rdx, qword [r13 + 8]
mov r8, qword [r13 + 0x10]
lea rcx, str._default:__s__value:__s_n
call fcn.14001b680
jmp 0x14001f340
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
nop
add rsp, 0x2048
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test al, 1
je 0x14001f5fd
lea rcx, str.No_defaults_in__s_n
mov rdx, rdi
call fcn.14001b680
mov rcx, rdi
add rsp, 0x2048
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]