Function at 0x61f070
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x60c
mov dword [esp + 8], edx
mov edi, ecx
mov esi, dword [esp + 0x620]
mov dword [0xae4ef8], 0
mov dword [0xae4ef4], 0
push 0x61f460
push 0x16
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4f10], eax
push 0x61f460
push 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4f04], eax
push 0x61f460
push 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4f00], eax
push 0x61f460
push 2
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4efc], eax
push 0x61f460
push 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4f08], eax
push 0x61f460
push 0xf
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xae4f0c], eax
mov dword [0xae4ef4], 1
test esi, esi
jne 0x61f150
cmp byte [0xae4ee4], 0
je 0x61f1ed
mov eax, dword [0xae4eec]
and eax, 0xfffffffb
mov dword [0xae4f14], eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push dword [0xae4f14]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
movzx eax, byte [0xae4ee4]
mov dword [0xae4ef4], 2
mov byte [esp + 0xc], 0
cmp al, 1
jne 0x61f1fc
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x61f225
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, esp
lea ebx, [esp + 0x20c]
push 0
push ecx
push 0x1ff
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x61f277
mov eax, dword [esp]
cmp eax, 2
jb 0x61f284
cmp word [esp + eax*2 + 0x208], 0xd
jne 0x61f284
cmp word [esp + eax*2 + 0x20a], 0xa
jne 0x61f284
mov esi, edi
mov word [esp + eax*2 + 0x208], 0xa
dec eax
mov dword [esp], eax
jmp 0x61f286
mov dword [0xae4ef4], 2
mov byte [esp + 0xc], 0
lea eax, [esp + 0xc]
push dword [0xae4ef0]
push 0x1ff
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
mov ebp, eax
xor ebx, ebx
test ebp, ebp
jne 0x61f2d6
jmp 0x61f36c
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, esp
lea ebp, [esp + 0xc]
push 0
push ecx
push 0x1ff
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x61f277
mov eax, dword [esp]
cmp eax, 2
jb 0x61f267
lea ecx, [esp + 0xc]
cmp byte [eax + ecx - 2], 0xd
jne 0x61f267
cmp byte [esp + eax + 0xb], 0xa
jne 0x61f267
mov byte [esp + eax + 0xa], 0xa
dec eax
mov byte [esp + eax + 0xc], 0
xor ebx, ebx
test ebp, ebp
jne 0x61f2d6
jmp 0x61f36c
xor ebp, ebp
xor ebx, ebx
test ebp, ebp
jne 0x61f2d6
jmp 0x61f36c
mov esi, edi
mov word [esp + eax*2 + 0x20c], 0
lea edi, [esp + 0xc]
push 0
push 0
push 0x200
push edi
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ebp, ebp
test eax, eax
cmovg ebp, edi
push 0x400
push ebx
call fcn.005e9a90
add esp, 8
mov edi, esi
mov esi, dword [esp + 0x620]
xor ebx, ebx
test ebp, ebp
je 0x61f36c
push dword [0xae4ef0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x61f36c
mov ebp, dword [0xae4ef0]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x61f36c
lea eax, [esp + 0xc]
push 0xa
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x61f321
cmp dword [esp + 0x624], 0
je 0x61f353
mov byte [eax], 0
jmp 0x61f353
mov dword [esp + 4], edi
lea edi, [esp + 0x20c]
nop dword [eax]
push ebp
push 4
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x61f36c
push 0xa
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x61f330
mov edi, dword [esp + 4]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0xc]
push edi
call fcn.0061eb00
add esp, 0xc
mov ebx, eax
not ebx
shr ebx, 0x1f
mov edi, dword [0xae4ef8]
test esi, esi
je 0x61f37d
mov eax, dword [0xae4ef4]
jmp 0x61f39b
push dword [0xae4ee8]
push 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
add esp, 8
mov eax, dword [0xae4ef4]
cmp eax, 2
jge 0x61f429
test eax, eax
jle 0x61f3ff
push dword [0xae4f10]
push 0x16
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xae4f04]
push 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xae4f00]
push 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xae4efc]
push 2
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xae4f08]
push 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xae4f0c]
push 0xf
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
cmp edi, 2
mov eax, 0xffffffff
cmove ebx, eax
lea eax, [esp + 0xc]
push 0x200
push eax
call fcn.005e9a90
add esp, 8
mov eax, ebx
add esp, 0x60c
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [0xae4ee4], 1
jne 0x61f39f
mov eax, dword [0xae4eec]
mov dword [0xae4f14], eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push dword [0xae4f14]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
jmp 0x61f376