Function at 0x140012ab0
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 [0x1400284a0]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, rdx
mov rbp, rcx
xor r15d, r15d
lea rdx, [0x14002391c]
lea rcx, str.CONIN_
mov dword [rsp + 0x20], r15d
movzx r12d, r9b
mov r14, r8
call fcn.1400104a0
lea rdx, [0x14002391c]
mov rdi, rax
lea rcx, str.CONOUT_
call fcn.1400104a0
mov rsi, rax
test rdi, rdi
je 0x140012b6d
test rax, rax
je 0x140012b64
lea rcx, str.OSTYPE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140012b94
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 0x140012b94
cmp rcx, 5
jne 0x140012b50
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test rsi, rsi
je 0x140012b7b
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 0x140012bc9
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 0x140012beb
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 0x140012c01
mov byte [rbx], al
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x140012c10
test eax, eax
jle 0x140012c75
cdqe
add rbx, rax
cmp byte [rbx - 1], 0xa
je 0x140012c71
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 0x140012c6b
lea rcx, [rsp + 0x30]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140012c54
test eax, eax
jle 0x140012c6b
movsxd rcx, eax
cmp byte [rsp + rcx + 0x2f], 0xa
jne 0x140012c30
cmp byte [rbx - 1], 0xa
jne 0x140012c75
mov byte [rbx - 1], 0
test r12b, r12b
jne 0x140012ca0
mov edx, dword [rsp + 0x20]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rdx, rsi
lea rcx, [0x14001ee90]
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 0x140012cbf
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.140014dd0
add rsp, 0xc0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret