Function at 0x10123f80
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x614
call fcn.10084f50
mov eax, dword [0x101c3080]
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 [0x101ce4ec], 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 [0x101ce4f0], esi
call fcn.10123f10
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x101ce4f0], 1
test ebp, ebp
jne 0x10124010
cmp dword [0x101ce4e8], esi
je 0x10124010
mov eax, dword [0x101ce4d8]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x101ce4dc], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x101ce4f0], 2
mov byte [esp + 0x20], 0
cmp dword [0x101ce4e8], esi
je 0x10124140
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 0x101240f5
lea eax, [esp + 0x22c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x101241d5
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x1012409a
cmp word [esp + eax*2 + 0x21c], 0xd
jne 0x1012409a
cmp word [esp + eax*2 + 0x21e], 0xa
jne 0x1012409a
mov ecx, 0xa
mov word [esp + eax*2 + 0x21c], cx
dec eax
mov dword [esp + 0x10], eax
add eax, eax
cmp eax, 0x400
jae 0x10124268
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 0x1012415a
lea eax, [esp + 0x2c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x101241d5
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x1012412e
cmp byte [esp + eax + 0x1e], 0xd
jne 0x1012412e
cmp byte [esp + eax + 0x1f], 0xa
jne 0x1012412e
mov byte [esp + eax + 0x1e], 0xa
dec eax
mov dword [esp + 0x10], eax
cmp eax, 0x200
jae 0x10124268
mov byte [esp + eax + 0x20], 0
jmp 0x10124162
push dword [0x101ce4e0]
lea eax, [esp + 0x24]
push 0x1ff
push eax
call fcn.1008d57f
add esp, 0xc
mov edi, eax
test edi, edi
je 0x101241d5
mov edi, dword [esp + 0x14]
push dword [0x101ce4e0]
call fcn.10166390
add esp, 4
test eax, eax
jne 0x101241d5
push dword [0x101ce4e0]
call fcn.101663bc
add esp, 4
test eax, eax
jne 0x101241d5
lea eax, [esp + 0x20]
push 0xa
push eax
call fcn.100865f0
add esp, 8
test eax, eax
je 0x101241a7
cmp dword [esp + 0x634], esi
je 0x101241b9
mov byte [eax], 0
jmp 0x101241b9
push dword [0x101ce4e0]
call fcn.10124270
add esp, 4
test eax, eax
je 0x101241d5
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x1c]
push edi
call fcn.101106a0
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns esi, ecx
mov eax, dword [0x101ce4ec]
or ecx, 0xffffffff
cmp eax, 2
cmove esi, ecx
cmp dword [esp + 0x1c], 0
je 0x101241fd
push 0x1016b570
push dword [0x101ce4e4]
call fcn.100d3410
add esp, 8
mov eax, dword [0x101ce4f0]
cmp eax, 2
jl 0x10124231
test ebp, ebp
jne 0x10124231
cmp dword [0x101ce4e8], ebp
je 0x10124231
mov eax, dword [0x101ce4d8]
or eax, 4
push eax
push 0xfffffffffffffff6
mov dword [0x101ce4dc], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x101ce4f0]
cmp eax, 1
jl 0x1012423b
call fcn.10123eb0
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.10084565
add esp, 0x614
ret
call fcn.10084add
int3