Function at 0x10102f80
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x614
call fcn.100857c0
mov eax, dword [0x1019b080]
xor eax, esp
mov dword [esp + 0x610], eax
mov eax, dword [esp + 0x61c]
push ebx
push ebp
mov ebp, dword [esp + 0x628]
mov dword [esp + 0x10], eax
xor eax, eax
test ebp, ebp
mov dword [0x101a512c], 0
push esi
sete al
xor esi, esi
push edi
mov edi, dword [esp + 0x628]
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], eax
mov dword [0x101a5130], esi
call fcn.10102f10
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x101a5130], 1
test ebp, ebp
jne 0x10103010
cmp dword [0x101a5128], esi
je 0x10103010
mov eax, dword [0x101a5118]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x101a511c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x101a5130], 2
mov byte [esp + 0x20], 0
cmp dword [0x101a5128], esi
je 0x10103140
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
test eax, eax
lea eax, [esp + 0x14]
push eax
push 0x1ff
je 0x101030f5
lea eax, [esp + 0x22c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x101031d5
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x1010309a
cmp word [esp + eax*2 + 0x21c], 0xd
jne 0x1010309a
cmp word [esp + eax*2 + 0x21e], 0xa
jne 0x1010309a
mov ecx, 0xa
mov word [esp + eax*2 + 0x21c], cx
dec eax
mov dword [esp + 0x10], eax
add eax, eax
cmp eax, 0x400
jae 0x10103268
xor ecx, ecx
push ecx
push ecx
push 0x200
mov word [esp + eax + 0x22c], cx
lea eax, [esp + 0x2c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x234]
push eax
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
lea edi, [esp + 0x20]
mov eax, esi
cmovle edi, eax
lea eax, [esp + 0x220]
push 0x400
push eax
call fcn.10001360
add esp, 8
jmp 0x1010315a
lea eax, [esp + 0x2c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x101031d5
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x1010312e
cmp byte [esp + eax + 0x1e], 0xd
jne 0x1010312e
cmp byte [esp + eax + 0x1f], 0xa
jne 0x1010312e
mov byte [esp + eax + 0x1e], 0xa
dec eax
mov dword [esp + 0x10], eax
cmp eax, 0x200
jae 0x10103268
mov byte [esp + eax + 0x20], 0
jmp 0x10103162
push dword [0x101a5120]
lea eax, [esp + 0x24]
push 0x1ff
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
mov edi, eax
test edi, edi
je 0x101031d5
mov edi, dword [esp + 0x14]
push dword [0x101a5120]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x101031d5
push dword [0x101a5120]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x101031d5
lea eax, [esp + 0x20]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x101031a7
cmp dword [esp + 0x634], esi
je 0x101031b9
mov byte [eax], 0
jmp 0x101031b9
push dword [0x101a5120]
call fcn.10103270
add esp, 4
test eax, eax
je 0x101031d5
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x1c]
push edi
call fcn.100ef6a0
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns esi, ecx
mov eax, dword [0x101a512c]
or ecx, 0xffffffff
cmp eax, 2
cmove esi, ecx
cmp dword [esp + 0x1c], 0
je 0x101031fd
push 0x10149660
push dword [0x101a5124]
call fcn.100b2410
add esp, 8
mov eax, dword [0x101a5130]
cmp eax, 2
jl 0x10103231
test ebp, ebp
jne 0x10103231
cmp dword [0x101a5128], ebp
je 0x10103231
mov eax, dword [0x101a5118]
or eax, 4
push eax
push 0xfffffffffffffff6
mov dword [0x101a511c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x101a5130]
cmp eax, 1
jl 0x1010323b
call fcn.10102eb0
lea eax, [esp + 0x20]
push 0x200
push eax
call fcn.10001360
mov ecx, dword [esp + 0x628]
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10084980
add esp, 0x614
ret
call fcn.10084ab0
int3