Function at 0x6b61d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x7ec06c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x618], eax
xor edi, edi
mov eax, dword [ebp + 0xc]
push 0x6b6590
push 0x16
mov dword [ebp - 0x614], eax
mov dword [0x80992c], 0
mov dword [0x809930], edi
call fcn.0056f033
push 0x6b6590
push 8
mov dword [0x8098f0], eax
call fcn.0056f033
push 0x6b6590
push 4
mov dword [0x8098b8], eax
call fcn.0056f033
push 0x6b6590
push 2
mov dword [0x8098a8], eax
call fcn.0056f033
push 0x6b6590
push 0xb
mov dword [0x8098a0], eax
call fcn.0056f033
push 0x6b6590
push 0xf
mov dword [0x8098c4], eax
call fcn.0056f033
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x8098d4], eax
mov dword [0x809930], 1
cmp dword [ebp + 0x10], edi
jne 0x6b62a9
cmp dword [0x809928], edi
je 0x6b62a9
mov eax, dword [0x809918]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x80991c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [0x809930], 2
mov byte [ebp - 0x20c], 0
cmp dword [0x809928], edi
je 0x6b63f4
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
test eax, eax
lea eax, [ebp - 0x610]
push eax
push 0x1ff
je 0x6b6397
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x6b64af
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x6b633a
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x6b633a
cmp word [ebp + eax*2 - 0x60e], 0xa
jne 0x6b633a
mov ecx, 0xa
mov word [ebp + eax*2 - 0x610], cx
dec eax
mov dword [ebp - 0x610], eax
add eax, eax
cmp eax, 0x400
jae 0x6b6585
xor ecx, ecx
push ecx
push ecx
push 0x200
mov word [ebp + eax - 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.0064c380
add esp, 8
jmp 0x6b6410
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x6b64af
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x6b63df
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x6b63df
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x6b63df
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 0x610], eax
cmp eax, 0x200
jae 0x6b6585
mov byte [ebp + eax - 0x20c], 0
jmp 0x6b6418
push dword [0x809920]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.005cd65e
add esp, 0xc
mov esi, eax
test esi, esi
je 0x6b64af
push dword [0x809920]
call fcn.006b695c
add esp, 4
test eax, eax
jne 0x6b64af
push dword [0x809920]
call fcn.006b6987
add esp, 4
test eax, eax
jne 0x6b64af
lea eax, [ebp - 0x20c]
push 0xa
push eax
call fcn.00552990
add esp, 8
test eax, eax
je 0x6b645f
cmp dword [ebp + 0x14], edi
je 0x6b648a
mov byte [eax], 0
jmp 0x6b648a
mov esi, dword [0x809920]
push esi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.005cd65e
add esp, 0xc
test eax, eax
je 0x6b64af
lea eax, [ebp - 0xc]
push 0xa
push eax
call fcn.00552990
add esp, 8
test eax, eax
je 0x6b6465
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x614]
push dword [ebp - 0x618]
call fcn.006b5a70
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns edi, ecx
mov eax, dword [0x80992c]
or ecx, 0xffffffff
mov esi, dword [ebp + 0x10]
cmp eax, 2
cmove edi, ecx
test esi, esi
jne 0x6b64d7
push 0x784930
push dword [0x809924]
call fcn.00443506
add esp, 8
mov eax, dword [0x809930]
cmp eax, 2
jl 0x6b6508
test esi, esi
jne 0x6b6508
cmp dword [0x809928], esi
je 0x6b6508
mov eax, dword [0x809918]
push eax
push 0xfffffffffffffff6
mov dword [0x80991c], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x809930]
cmp eax, 1
jl 0x6b655e
push dword [0x8098f0]
push 0x16
call fcn.0056f033
push dword [0x8098b8]
push 8
call fcn.0056f033
push dword [0x8098a8]
push 4
call fcn.0056f033
push dword [0x8098a0]
push 2
call fcn.0056f033
push dword [0x8098c4]
push 0xb
call fcn.0056f033
push dword [0x8098d4]
push 0xf
call fcn.0056f033
add esp, 0x30
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.0064c380
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, edi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0053bd3e
mov esp, ebp
pop ebp
ret
call fcn.0053c69f
int3