Function at 0x14000c320
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 [0x1400172f0]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, rdx
mov rbp, rcx
xor r15d, r15d
lea rdx, [0x140012dfc]
lea rcx, str.CONIN_
mov dword [rsp + 0x20], r15d
movzx r12d, r9b
mov r14, r8
call fcn.14000b9d0
lea rdx, [0x140012dfc]
mov rdi, rax
lea rcx, str.CONOUT_
call fcn.14000b9d0
mov rsi, rax
test rdi, rdi
je 0x14000c3dd
test rax, rax
je 0x14000c3d4
lea rcx, str.OSTYPE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x14000c404
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 0x14000c404
cmp rcx, 5
jne 0x14000c3c0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test rsi, rsi
je 0x14000c3eb
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 0x14000c439
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 0x14000c45b
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 0x14000c471
mov byte [rbx], al
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x14000c480
test eax, eax
jle 0x14000c4e5
cdqe
add rbx, rax
cmp byte [rbx - 1], 0xa
je 0x14000c4e1
nop dword [rax + rax]
mov r8, rdi
lea rcx, [rsp + 0x30]
mov edx, 0x80
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x14000c4db
lea rcx, [rsp + 0x30]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x14000c4c4
test eax, eax
jle 0x14000c4db
movsxd rcx, eax
cmp byte [rsp + rcx + 0x2f], 0xa
jne 0x14000c4a0
cmp byte [rbx - 1], 0xa
jne 0x14000c4e5
mov byte [rbx - 1], 0
test r12b, r12b
jne 0x14000c510
mov edx, dword [rsp + 0x20]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rdx, rsi
lea rcx, [0x140012650]
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 0x14000c52f
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.14000e3e0
add rsp, 0xc0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret