Function at 0x52a690
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60c
mov dword [0x60097c], 0
push ebx
push esi
push edi
push 0x52aa00
xor edi, edi
push 0x16
mov dword [0x600980], edi
call fcn.00548fd1
push 0x52aa00
push 8
mov dword [0x600940], eax
call fcn.00548fd1
push 0x52aa00
push 4
mov dword [0x600908], eax
call fcn.00548fd1
push 0x52aa00
push 2
mov dword [0x6008f8], eax
call fcn.00548fd1
push 0x52aa00
push 0xb
mov dword [0x6008f0], eax
call fcn.00548fd1
push 0x52aa00
push 0xf
mov dword [0x600914], eax
call fcn.00548fd1
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 0x52a74d
cmp dword [0x600978], edi
je 0x52a74d
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 0x52a871
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 0x52a825
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x52a926
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x52a7d5
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x52a7d5
cmp word [ebp + eax*2 - 0x60e], 0xa
jne 0x52a7d5
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.004579a0
add esp, 8
jmp 0x52a88d
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x52a926
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x52a867
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x52a867
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x52a867
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 4], eax
mov byte [ebp + eax - 0x20c], 0
jmp 0x52a895
push dword [0x600970]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.005486d1
add esp, 0xc
mov esi, eax
test esi, esi
je 0x52a926
push dword [0x600970]
call fcn.005485b6
add esp, 4
test eax, eax
jne 0x52a926
push dword [0x600970]
call fcn.005485e1
add esp, 4
test eax, eax
jne 0x52a926
lea eax, [ebp - 0x20c]
push 0xa
push eax
call fcn.0053f1e0
add esp, 8
test eax, eax
je 0x52a8dc
cmp dword [ebp + 0x14], edi
je 0x52a907
mov byte [eax], 0
jmp 0x52a907
mov esi, dword [0x600970]
push esi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.005486d1
add esp, 0xc
test eax, eax
je 0x52a926
lea eax, [ebp - 0xc]
push 0xa
push eax
call fcn.0053f1e0
add esp, 8
test eax, eax
je 0x52a8e2
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00501e90
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 0x52a94e
push 0x56e9c0
push dword [0x600974]
call fcn.0041a7d0
add esp, 8
mov eax, dword [0x600980]
cmp eax, 2
jl 0x52a97f
test esi, esi
jne 0x52a97f
cmp dword [0x600978], esi
je 0x52a97f
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 0x52a9d5
push dword [0x600940]
push 0x16
call fcn.00548fd1
push dword [0x600908]
push 8
call fcn.00548fd1
push dword [0x6008f8]
push 4
call fcn.00548fd1
push dword [0x6008f0]
push 2
call fcn.00548fd1
push dword [0x600914]
push 0xb
call fcn.00548fd1
push dword [0x600924]
push 0xf
call fcn.00548fd1
add esp, 0x30
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.004579a0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret