Function at 0x528e20
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60c
mov dword [0x5fd92c], 0
push ebx
push esi
push edi
push 0x529190
xor edi, edi
push 0x16
mov dword [0x5fd930], edi
call fcn.005473d1
push 0x529190
push 8
mov dword [0x5fd8f0], eax
call fcn.005473d1
push 0x529190
push 4
mov dword [0x5fd8b8], eax
call fcn.005473d1
push 0x529190
push 2
mov dword [0x5fd8a8], eax
call fcn.005473d1
push 0x529190
push 0xb
mov dword [0x5fd8a0], eax
call fcn.005473d1
push 0x529190
push 0xf
mov dword [0x5fd8c4], eax
call fcn.005473d1
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x5fd8d4], eax
mov dword [0x5fd930], 1
cmp dword [ebp + 0x10], edi
jne 0x528edd
cmp dword [0x5fd928], edi
je 0x528edd
mov eax, dword [0x5fd918]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x5fd91c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x5fd930], 2
mov byte [ebp - 0x20c], 0
cmp dword [0x5fd928], edi
je 0x529001
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push 0x1ff
je 0x528fb5
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x5290b6
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x528f65
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x528f65
cmp word [ebp + eax*2 - 0x60e], 0xa
jne 0x528f65
mov ecx, 0xa
mov word [ebp + eax*2 - 0x610], cx
dec eax
mov dword [ebp - 4], eax
xor ecx, ecx
push ecx
push ecx
push 0x200
mov word [ebp + eax*2 - 0x60c], cx
lea eax, [ebp - 0x20c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x60c]
push eax
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
lea esi, [ebp - 0x20c]
mov eax, edi
cmovle esi, eax
lea eax, [ebp - 0x60c]
push 0x400
push eax
call fcn.00456130
add esp, 8
jmp 0x52901d
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x5290b6
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x528ff7
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x528ff7
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x528ff7
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 4], eax
mov byte [ebp + eax - 0x20c], 0
jmp 0x529025
push dword [0x5fd920]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.00546ad1
add esp, 0xc
mov esi, eax
test esi, esi
je 0x5290b6
push dword [0x5fd920]
call fcn.005469b6
add esp, 4
test eax, eax
jne 0x5290b6
push dword [0x5fd920]
call fcn.005469e1
add esp, 4
test eax, eax
jne 0x5290b6
lea eax, [ebp - 0x20c]
push 0xa
push eax
call fcn.0053d970
add esp, 8
test eax, eax
je 0x52906c
cmp dword [ebp + 0x14], edi
je 0x529097
mov byte [eax], 0
jmp 0x529097
mov esi, dword [0x5fd920]
push esi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.00546ad1
add esp, 0xc
test eax, eax
je 0x5290b6
lea eax, [ebp - 0xc]
push 0xa
push eax
call fcn.0053d970
add esp, 8
test eax, eax
je 0x529072
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00500600
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns edi, ecx
mov eax, dword [0x5fd92c]
or ecx, 0xffffffff
mov esi, dword [ebp + 0x10]
cmp eax, 2
cmove edi, ecx
test esi, esi
jne 0x5290de
push 0x56b3a0
push dword [0x5fd924]
call fcn.00419d00
add esp, 8
mov eax, dword [0x5fd930]
cmp eax, 2
jl 0x52910f
test esi, esi
jne 0x52910f
cmp dword [0x5fd928], esi
je 0x52910f
mov eax, dword [0x5fd918]
push eax
push 0xfffffffffffffff6
mov dword [0x5fd91c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x5fd930]
cmp eax, 1
jl 0x529165
push dword [0x5fd8f0]
push 0x16
call fcn.005473d1
push dword [0x5fd8b8]
push 8
call fcn.005473d1
push dword [0x5fd8a8]
push 4
call fcn.005473d1
push dword [0x5fd8a0]
push 2
call fcn.005473d1
push dword [0x5fd8c4]
push 0xb
call fcn.005473d1
push dword [0x5fd8d4]
push 0xf
call fcn.005473d1
add esp, 0x30
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.00456130
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret