Function at 0x10153e80
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x614
call fcn.100011c0
mov eax, dword [0x102293a4]
xor eax, esp
mov dword [esp + 0x610], eax
mov eax, dword [esp + 0x61c]
push ebx
push ebp
mov ebp, dword [esp + 0x620]
push esi
push edi
push 0x101543c0
xor edi, edi
mov dword [esp + 0x18], eax
push 0x16
mov dword [0x1022c85c], 0
mov dword [0x1022c860], edi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x101543c0
push 8
mov dword [0x1022c820], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x101543c0
push 4
mov dword [0x1022c7e8], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x101543c0
push 2
mov dword [0x1022c7d8], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x101543c0
push 0xb
mov dword [0x1022c7d0], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x101543c0
push 0xf
mov dword [0x1022c7f4], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
mov ebx, dword [esp + 0x660]
add esp, 0x30
mov dword [0x1022c804], eax
mov dword [0x1022c860], 1
test ebx, ebx
jne 0x10153f69
cmp dword [0x1022c858], edi
je 0x10153f69
mov eax, dword [0x1022c848]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x1022c84c], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x1022c860], 2
mov byte [esp + 0x20], 0
cmp dword [0x1022c858], edi
je 0x101540a1
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 0x10154052
lea eax, [esp + 0x22c]
push eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x10154155
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x10153ff7
cmp word [esp + eax*2 + 0x21c], 0xd
jne 0x10153ff7
cmp word [esp + eax*2 + 0x21e], 0xa
jne 0x10153ff7
mov ecx, 0xa
mov word [esp + eax*2 + 0x21c], cx
dec eax
mov dword [esp + 0x10], eax
add eax, eax
cmp eax, 0x400
jae 0x10154238
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 esi, [esp + 0x20]
mov eax, edi
cmovle esi, eax
lea eax, [esp + 0x220]
push 0x400
push eax
call sym.libcrypto_1_1.dll_OPENSSL_cleanse
add esp, 8
jmp 0x101540bc
lea eax, [esp + 0x2c]
push eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x10154155
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x1015408f
cmp byte [esp + eax + 0x1e], 0xd
jne 0x1015408f
cmp byte [esp + eax + 0x1f], 0xa
jne 0x1015408f
mov byte [esp + eax + 0x1e], 0xa
dec eax
mov dword [esp + 0x10], eax
cmp eax, 0x200
jae 0x10154238
mov byte [esp + eax + 0x20], 0
jmp 0x101540c4
push dword [0x1022c850]
lea eax, [esp + 0x24]
push 0x1ff
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
mov esi, eax
test esi, esi
je 0x10154155
push dword [0x1022c850]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
jne 0x10154155
push dword [0x1022c850]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x10154155
lea eax, [esp + 0x20]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x1015410b
cmp dword [esp + 0x634], edi
je 0x10154139
mov byte [eax], 0
jmp 0x10154139
mov esi, dword [0x1022c850]
push esi
lea eax, [esp + 0x1c]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x10154155
lea eax, [esp + 0x18]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x10154111
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
push ebp
call sym.libcrypto_1_1.dll_UI_set_result
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns edi, ecx
mov eax, dword [0x1022c85c]
or ecx, 0xffffffff
cmp eax, 2
cmove edi, ecx
test ebx, ebx
jne 0x1015417a
push 0x1019c754
push dword [0x1022c854]
call fcn.1000a540
add esp, 8
mov eax, dword [0x1022c860]
cmp eax, 2
jl 0x101541af
test ebx, ebx
jne 0x101541af
cmp dword [0x1022c858], ebx
je 0x101541af
mov eax, dword [0x1022c848]
push eax
push 0xfffffffffffffff6
mov dword [0x1022c84c], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x1022c860]
cmp eax, 1
jl 0x1015420b
push dword [0x1022c820]
push 0x16
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push dword [0x1022c7e8]
push 8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push dword [0x1022c7d8]
push 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push dword [0x1022c7d0]
push 2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push dword [0x1022c7f4]
push 0xb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push dword [0x1022c804]
push 0xf
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
add esp, 0x30
lea eax, [esp + 0x20]
push 0x200
push eax
call sym.libcrypto_1_1.dll_OPENSSL_cleanse
mov ecx, dword [esp + 0x628]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1000b910
add esp, 0x614
ret
call fcn.100086d0
int3