Function at 0x52a600
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60c
mov dword [0x60097c], 0
push ebx
push esi
push edi
push 0x52a970
xor edi, edi
push 0x16
mov dword [0x600980], edi
call fcn.00548f41
push 0x52a970
push 8
mov dword [0x600940], eax
call fcn.00548f41
push 0x52a970
push 4
mov dword [0x600908], eax
call fcn.00548f41
push 0x52a970
push 2
mov dword [0x6008f8], eax
call fcn.00548f41
push 0x52a970
push 0xb
mov dword [0x6008f0], eax
call fcn.00548f41
push 0x52a970
push 0xf
mov dword [0x600914], eax
call fcn.00548f41
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x600924], eax
mov dword [0x600980], 1
cmp dword [ebp + 0x10], edi
jne 0x52a6bd
cmp dword [0x600978], edi
je 0x52a6bd
mov eax, dword [0x600968]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x60096c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x600980], 2
mov byte [ebp - 0x20c], 0
cmp dword [0x600978], edi
je 0x52a7e1
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 0x52a795
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x52a896
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x52a745
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x52a745
cmp word [ebp + eax*2 - 0x60e], 0xa
jne 0x52a745
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.004578d0
add esp, 8
jmp 0x52a7fd
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x52a896
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x52a7d7
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x52a7d7
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x52a7d7
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 4], eax
mov byte [ebp + eax - 0x20c], 0
jmp 0x52a805
push dword [0x600970]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.00548641
add esp, 0xc
mov esi, eax
test esi, esi
je 0x52a896
push dword [0x600970]
call fcn.00548526
add esp, 4
test eax, eax
jne 0x52a896
push dword [0x600970]
call fcn.00548551
add esp, 4
test eax, eax
jne 0x52a896
lea eax, [ebp - 0x20c]
push 0xa
push eax
call fcn.0053f150
add esp, 8
test eax, eax
je 0x52a84c
cmp dword [ebp + 0x14], edi
je 0x52a877
mov byte [eax], 0
jmp 0x52a877
mov esi, dword [0x600970]
push esi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.00548641
add esp, 0xc
test eax, eax
je 0x52a896
lea eax, [ebp - 0xc]
push 0xa
push eax
call fcn.0053f150
add esp, 8
test eax, eax
je 0x52a852
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00501e00
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns edi, ecx
mov eax, dword [0x60097c]
or ecx, 0xffffffff
mov esi, dword [ebp + 0x10]
cmp eax, 2
cmove edi, ecx
test esi, esi
jne 0x52a8be
push 0x56e870
push dword [0x600974]
call fcn.0041a7d0
add esp, 8
mov eax, dword [0x600980]
cmp eax, 2
jl 0x52a8ef
test esi, esi
jne 0x52a8ef
cmp dword [0x600978], esi
je 0x52a8ef
mov eax, dword [0x600968]
push eax
push 0xfffffffffffffff6
mov dword [0x60096c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x600980]
cmp eax, 1
jl 0x52a945
push dword [0x600940]
push 0x16
call fcn.00548f41
push dword [0x600908]
push 8
call fcn.00548f41
push dword [0x6008f8]
push 4
call fcn.00548f41
push dword [0x6008f0]
push 2
call fcn.00548f41
push dword [0x600914]
push 0xb
call fcn.00548f41
push dword [0x600924]
push 0xf
call fcn.00548f41
add esp, 0x30
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.004578d0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret