Function at 0x569690
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x618
call fcn.005fffa0
mov eax, dword [0x6a0f4c]
xor eax, esp
mov dword [esp + 0x614], eax
mov eax, dword [esp + 0x61c]
push ebx
push ebp
mov ebp, dword [esp + 0x628]
xor ebx, ebx
xor edx, edx
push esi
xor esi, esi
cmp ebp, ebx
sete dl
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
mov dword [0x6a6014], ebx
mov dword [esp + 0x10], ebx
mov dword [0x6a6008], ebx
mov dword [esp + 0x18], edx
call fcn.00569630
mov dword [0x6a6008], 1
cmp ebp, ebx
jne 0x569718
cmp dword [0x6a6004], ebx
je 0x569718
mov eax, dword [0x6a6098]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x6a6000], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x6a6008], 2
mov byte [esp + 0x20], bl
cmp dword [0x6a6004], ebx
je 0x56983a
push ebx
push ebx
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
test eax, eax
je 0x5697ed
lea eax, [esp + 0x10]
push eax
push 0x1ff
lea ecx, [esp + 0x22c]
push ecx
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x5698d6
mov eax, dword [esp + 0xc]
cmp eax, 2
jb 0x5697a2
cmp word [esp + eax*2 + 0x21c], 0xd
jne 0x5697a2
cmp word [esp + eax*2 + 0x21e], 0xa
jne 0x5697a2
mov edx, 0xa
mov word [esp + eax*2 + 0x21c], dx
dec eax
mov dword [esp + 0xc], eax
push ebx
push ebx
push 0x200
lea edx, [esp + 0x2c]
push edx
xor ecx, ecx
push 0xffffffffffffffff
mov word [esp + eax*2 + 0x234], cx
lea eax, [esp + 0x234]
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x5697d6
lea esi, [esp + 0x20]
lea ecx, [esp + 0x220]
push 0x400
push ecx
call fcn.00491200
add esp, 8
jmp 0x569856
lea edx, [esp + 0x10]
push edx
push 0x1ff
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 0x5698d6
mov eax, dword [esp + 0xc]
cmp eax, 2
jb 0x569834
cmp byte [esp + eax + 0x1e], 0xd
jne 0x569834
cmp byte [esp + eax + 0x1f], 0xa
jne 0x569834
mov byte [esp + eax + 0x1e], 0xa
dec eax
mov dword [esp + 0xc], eax
mov byte [esp + eax + 0x20], bl
jmp 0x56985a
mov ecx, dword [0x6a6010]
push ecx
lea edx, [esp + 0x24]
push 0x1ff
push edx
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
mov esi, eax
cmp esi, ebx
je 0x5698d6
mov eax, dword [0x6a6010]
push eax
call dword [sym.imp.MSVCR90.dll_feof]
add esp, 4
test eax, eax
jne 0x5698d6
mov ecx, dword [0x6a6010]
push ecx
call dword [sym.imp.MSVCR90.dll_ferror]
add esp, 4
test eax, eax
jne 0x5698d6
lea edx, [esp + 0x20]
push 0xa
push edx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
cmp eax, ebx
je 0x5698a2
cmp dword [esp + 0x630], ebx
je 0x5698b3
mov byte [eax], bl
jmp 0x5698b3
push edi
mov edi, dword [0x6a6010]
call fcn.005693f0
pop edi
test eax, eax
je 0x5698d6
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
push ecx
push edx
call fcn.0052b2e0
add esp, 0xc
test eax, eax
jl 0x5698d6
mov dword [esp + 0x10], 1
mov eax, dword [0x6a6014]
cmp eax, 2
jne 0x5698e8
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x18], ebx
je 0x569903
mov ecx, dword [0x6a600c]
push 0x68a45c
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
cmp dword [0x6a6008], 2
jl 0x569932
cmp ebp, ebx
jne 0x569932
cmp dword [0x6a6004], ebx
je 0x569932
mov eax, dword [0x6a6098]
push eax
push 0xfffffffffffffff6
mov dword [0x6a6000], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
cmp dword [0x6a6008], 1
pop esi
pop ebp
pop ebx
jl 0x569943
call fcn.005695a0
lea edx, [esp + 0x14]
push 0x200
push edx
call fcn.00491200
mov ecx, dword [esp + 0x61c]
mov eax, dword [esp + 0xc]
add esp, 8
xor ecx, esp
call fcn.005fff12
add esp, 0x618
ret