Function at 0x8d4ea0
Capabilities:
Query environment variable

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x650
mov dword [0x010a8984], 0
mov dword [0x010a8980], 0
mov rbp, rcx
mov r12, rdx
mov ecx, 0x16
mov edi, r8d
lea rdx, [0x008d4dd0]
mov r13d, r9d
call sub.msvcrt.dll_signal
lea rdx, [0x008d4dd0]
mov ecx, 8
mov qword [0x010a8a70], rax
call sub.msvcrt.dll_signal
lea rdx, [0x008d4dd0]
mov ecx, 4
mov qword [0x010a8a00], rax
call sub.msvcrt.dll_signal
lea rdx, [0x008d4dd0]
mov ecx, 2
mov qword [0x010a89e0], rax
call sub.msvcrt.dll_signal
lea rdx, [0x008d4dd0]
mov ecx, 0xb
mov qword [0x010a89d0], rax
call sub.msvcrt.dll_signal
lea rdx, [0x008d4dd0]
mov ecx, 0xf
mov qword [0x010a8a18], rax
call sub.msvcrt.dll_signal
mov dword [0x010a8980], 1
mov qword [0x010a8a38], rax
test edi, edi
je 0x8d5120
mov eax, dword [0x010a8988]
mov byte [rsp + 0x50], 0
mov dword [0x010a8980], 2
test eax, eax
je 0x8d513f
lea rcx, str.OPENSSL_WIN32_UTF8
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov ecx, 0xfffffff6
test eax, eax
je 0x8d5065
call qword [sym.imp.KERNEL32.DLL_GetStdHandle]
lea r9, [rsp + 0x4c]
mov r8d, 0x1ff
lea r14, [rsp + 0x250]
mov qword [rsp + 0x20], 0
mov rdx, r14
mov rcx, rax
lea rsi, [rsp + 0x50]
call qword [sym.imp.KERNEL32.DLL_ReadConsoleW]
mov ebx, eax
test eax, eax
je 0x8d50d2
mov eax, dword [rsp + 0x4c]
cmp eax, 1
jbe 0x8d5007
lea edx, [rax - 2]
cmp word [rsp + rdx*2 + 0x250], 0xd
je 0x8d52b0
xor edx, edx
lea rsi, [rsp + 0x50]
mov ecx, 0xfde9
mov r8, r14
mov word [rsp + rax*2 + 0x250], dx
mov r9d, 0xffffffff
xor edx, edx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x200
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
mov edx, 0x400
mov rcx, r14
test eax, eax
jle 0x8d52a4
call fcn.0081b4c0
jmp 0x8d5161
call qword [sym.imp.KERNEL32.DLL_GetStdHandle]
lea rsi, [rsp + 0x50]
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], 0
mov r8d, 0x1ff
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_ReadConsoleA]
mov ebx, eax
test eax, eax
je 0x8d50d2
mov eax, dword [rsp + 0x4c]
cmp eax, 1
jbe 0x8d50ad
lea edx, [rax - 2]
cmp byte [rsp + rdx + 0x50], 0xd
je 0x8d52e1
mov rcx, qword [0x010a8998]
mov byte [rsp + rax + 0x50], 0
call sub.msvcrt.dll_feof
test eax, eax
je 0x8d5175
nop word cs:[rax + rax]
xor ebx, ebx
mov eax, dword [0x010a8984]
cmp eax, 2
mov eax, 0xffffffff
cmove ebx, eax
test edi, edi
je 0x8d5230
mov eax, dword [0x010a8980]
test eax, eax
jg 0x8d51c3
mov edx, 0x200
mov rcx, rsi
call fcn.0081b4c0
mov eax, ebx
add rsp, 0x650
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r9d, dword [0x010a8988]
test r9d, r9d
jne 0x8d5280
mov dword [0x010a8980], 2
mov byte [rsp + 0x50], 0
lea rsi, [rsp + 0x50]
mov r8, qword [0x010a8998]
mov edx, 0x1ff
mov rcx, rsi
call sub.msvcrt.dll_fgets
test rax, rax
je 0x8d50d0
mov rcx, qword [0x010a8998]
call sub.msvcrt.dll_feof
test eax, eax
jne 0x8d50d0
mov rcx, qword [0x010a8998]
call sub.msvcrt.dll_ferror
mov ebx, eax
test eax, eax
jne 0x8d50d0
mov edx, 0xa
mov rcx, rsi
call sub.msvcrt.dll_strchr
test rax, rax
je 0x8d5300
test r13d, r13d
je 0x8d51a9
mov byte [rax], 0
mov r8, rsi
mov rdx, r12
mov rcx, rbp
call fcn.008d4d90
not eax
mov ebx, eax
shr ebx, 0x1f
jmp 0x8d50d2
mov rdx, qword [0x010a8a70]
mov ecx, 0x16
call sub.msvcrt.dll_signal
mov rdx, qword [0x010a8a00]
mov ecx, 8
call sub.msvcrt.dll_signal
mov rdx, qword [0x010a89e0]
mov ecx, 4
call sub.msvcrt.dll_signal
mov rdx, qword [0x010a89d0]
mov ecx, 2
call sub.msvcrt.dll_signal
mov rdx, qword [0x010a8a18]
mov ecx, 0xb
call sub.msvcrt.dll_signal
mov rdx, qword [0x010a8a38]
mov ecx, 0xf
call sub.msvcrt.dll_signal
jmp 0x8d50f9
mov rdx, qword [0x010a8990]
mov ecx, 0xa
call sub.msvcrt.dll_fputc
mov eax, dword [0x010a8980]
cmp eax, 1
jle 0x8d50f1
mov eax, dword [0x010a8988]
test eax, eax
je 0x8d51c3
mov edi, dword [0x010a89a0]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov rcx, rax
mov edx, edi
call qword [sym.imp.KERNEL32.DLL_SetConsoleMode]
jmp 0x8d50eb
mov ebx, dword [0x010a89a0]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.DLL_GetStdHandle]
and ebx, 0xfffffffb
mov rcx, rax
mov edx, ebx
call qword [sym.imp.KERNEL32.DLL_SetConsoleMode]
jmp 0x8d4f73
call fcn.0081b4c0
xor ebx, ebx
jmp 0x8d50d2
lea r8d, [rax - 1]
cmp word [rsp + r8*2 + 0x250], 0xa
mov rcx, r8
jne 0x8d5007
mov r8d, 0xa
mov dword [rsp + 0x4c], ecx
mov eax, ecx
mov word [rsp + rdx*2 + 0x250], r8w
jmp 0x8d5007
lea r8d, [rax - 1]
cmp byte [rsp + r8 + 0x50], 0xa
jne 0x8d50ad
mov byte [rsp + rdx + 0x50], 0xa
mov eax, r8d
jmp 0x8d50ad
mov r13, qword [0x010a8998]
lea r14, [rsp + 0x250]
jmp 0x8d5327
mov edx, 0xa
mov rcx, r14
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x8d51a9
mov r8, r13
mov edx, 4
mov rcx, r14
call sub.msvcrt.dll_fgets
test rax, rax
jne 0x8d5311
jmp 0x8d50d2