Function at 0x61d4b0
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 [0xb5fef8], 0
mov dword [0xb5fef4], 0
push 0x61d8a0
push 0x16
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5ff10], eax
push 0x61d8a0
push 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5ff04], eax
push 0x61d8a0
push 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5ff00], eax
push 0x61d8a0
push 2
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5fefc], eax
push 0x61d8a0
push 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5ff08], eax
push 0x61d8a0
push 0xf
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
mov dword [0xb5ff0c], eax
mov dword [0xb5fef4], 1
test esi, esi
jne 0x61d590
cmp byte [0xb5fee4], 0
je 0x61d62d
mov eax, dword [0xb5feec]
and eax, 0xfffffffb
mov dword [0xb5ff14], eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push dword [0xb5ff14]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
movzx eax, byte [0xb5fee4]
mov dword [0xb5fef4], 2
mov byte [esp + 0xc], 0
cmp al, 1
jne 0x61d63c
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x61d665
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 0x61d6b7
mov eax, dword [esp]
cmp eax, 2
jb 0x61d6c4
cmp word [esp + eax*2 + 0x208], 0xd
jne 0x61d6c4
cmp word [esp + eax*2 + 0x20a], 0xa
jne 0x61d6c4
mov esi, edi
mov word [esp + eax*2 + 0x208], 0xa
dec eax
mov dword [esp], eax
jmp 0x61d6c6
mov dword [0xb5fef4], 2
mov byte [esp + 0xc], 0
lea eax, [esp + 0xc]
push dword [0xb5fef0]
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 0x61d716
jmp 0x61d7ac
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 0x61d6b7
mov eax, dword [esp]
cmp eax, 2
jb 0x61d6a7
lea ecx, [esp + 0xc]
cmp byte [eax + ecx - 2], 0xd
jne 0x61d6a7
cmp byte [esp + eax + 0xb], 0xa
jne 0x61d6a7
mov byte [esp + eax + 0xa], 0xa
dec eax
mov byte [esp + eax + 0xc], 0
xor ebx, ebx
test ebp, ebp
jne 0x61d716
jmp 0x61d7ac
xor ebp, ebp
xor ebx, ebx
test ebp, ebp
jne 0x61d716
jmp 0x61d7ac
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.005e7ed0
add esp, 8
mov edi, esi
mov esi, dword [esp + 0x620]
xor ebx, ebx
test ebp, ebp
je 0x61d7ac
push dword [0xb5fef0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x61d7ac
mov ebp, dword [0xb5fef0]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x61d7ac
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 0x61d761
cmp dword [esp + 0x624], 0
je 0x61d793
mov byte [eax], 0
jmp 0x61d793
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 0x61d7ac
push 0xa
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x61d770
mov edi, dword [esp + 4]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0xc]
push edi
call fcn.0061cf40
add esp, 0xc
mov ebx, eax
not ebx
shr ebx, 0x1f
mov edi, dword [0xb5fef8]
test esi, esi
je 0x61d7bd
mov eax, dword [0xb5fef4]
jmp 0x61d7db
push dword [0xb5fee8]
push 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
add esp, 8
mov eax, dword [0xb5fef4]
cmp eax, 2
jge 0x61d869
test eax, eax
jle 0x61d83f
push dword [0xb5ff10]
push 0x16
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xb5ff04]
push 8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xb5ff00]
push 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xb5fefc]
push 2
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xb5ff08]
push 0xb
call sub.api_ms_win_crt_runtime_l1_1_0.dll_signal
add esp, 8
push dword [0xb5ff0c]
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.005e7ed0
add esp, 8
mov eax, ebx
add esp, 0x60c
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [0xb5fee4], 1
jne 0x61d7df
mov eax, dword [0xb5feec]
mov dword [0xb5ff14], eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push dword [0xb5ff14]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
jmp 0x61d7b6