Function at 0x14001b7a0
Capabilities:
Query environment variable

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xc0
mov rax, qword [0x14002d030]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, rdx
mov rbp, rcx
xor r15d, r15d
lea rdx, [0x140027e9c]
lea rcx, str.CONIN_
mov dword [rsp + 0x20], r15d
movzx r12d, r9b
mov r14, r8
call fcn.14001a5e0
lea rdx, [0x140027e9c]
mov rdi, rax
lea rcx, str.CONOUT_
call fcn.14001a5e0
mov rsi, rax
test rdi, rdi
je 0x14001b85d
test rax, rax
je 0x14001b854
lea rcx, str.OSTYPE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x14001b884
lea rcx, str.OSTYPE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ecx, r15d
lea r8, str.msys
mov rdx, rax
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x14001b884
cmp rcx, 5
jne 0x14001b840
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test rsi, rsi
je 0x14001b86b
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rsi, rax
test r12b, r12b
jne 0x14001b8b9
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rcx, rax
lea rdx, [rsp + 0x20]
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov edx, 3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test rbp, rbp
je 0x14001b8db
mov rcx, rbp
call sub.libintl_8.dll_libintl_gettext
mov rcx, rax
mov rdx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov r8, rdi
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
jne 0x14001b8f1
mov byte [rbx], al
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x14001b900
test eax, eax
jle 0x14001b965
cdqe
add rbx, rax
cmp byte [rbx - 1], 0xa
je 0x14001b961
nop dword [rax + rax]
mov r8, rdi
lea rcx, [rsp + 0x30]
mov edx, Ordinal_130
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x14001b95b
lea rcx, [rsp + 0x30]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x14001b944
test eax, eax
jle 0x14001b95b
movsxd rcx, eax
cmp byte [rsp + rcx + 0x2f], 0xa
jne 0x14001b920
cmp byte [rbx - 1], 0xa
jne 0x14001b965
mov byte [rbx - 1], 0
test r12b, r12b
jne 0x14001b990
mov edx, dword [rsp + 0x20]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rdx, rsi
lea rcx, [0x140021abc]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x14001b9af
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.14001e2e0
add rsp, 0xc0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret