Function at 0x4cecfb
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x638034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, 0x4cf03e
mov dword [ebp - 0x618], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push esi
push 0x16
mov dword [ebp - 0x614], eax
mov dword [0x6418ac], ebx
mov dword [0x6418b0], ebx
call fcn.00571d38
push esi
push 8
mov dword [0x641870], eax
call fcn.00571d38
push esi
push 4
mov dword [0x641838], eax
call fcn.00571d38
push esi
push 2
mov dword [0x641828], eax
call fcn.00571d38
push esi
push 0xb
mov dword [0x641820], eax
call fcn.00571d38
push esi
push 0xf
mov dword [0x641844], eax
call fcn.00571d38
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x641854], eax
xor eax, eax
inc eax
mov dword [0x6418b0], eax
cmp dword [ebp + 0x10], ebx
jne 0x4cedbb
cmp dword [0x6418a8], ebx
je 0x4cedbb
mov eax, dword [0x641898]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x64189c], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0xa
mov dword [0x6418b0], 2
mov byte [ebp - 0x20c], bl
pop esi
cmp dword [0x6418a8], ebx
je 0x4ceefe
push ebx
push ebx
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebx
test eax, eax
lea eax, [ebp - 0x610]
push eax
push 0x1ff
je 0x4cee9f
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x4cefac
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4cee45
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x4cee45
cmp word [ebp + eax*2 - 0x60e], si
jne 0x4cee45
mov word [ebp + eax*2 - 0x610], si
dec eax
mov dword [ebp - 0x610], eax
add eax, eax
cmp eax, 0x400
jae 0x4cf038
push ebx
push ebx
push 0x200
xor ecx, ecx
mov word [ebp + eax - 0x60c], cx
lea eax, [ebp - 0x20c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x60c]
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
lea edi, [ebp - 0x20c]
lea eax, [ebp - 0x60c]
push 0x400
push eax
cmovle edi, ebx
call fcn.0045d09e
pop ecx
pop ecx
jmp 0x4cef1a
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x4cefac
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4ceee7
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x4ceee7
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x4ceee7
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 0x610], eax
cmp eax, 0x200
jae 0x4cf038
push 0xa
mov byte [ebp + eax - 0x20c], bl
pop esi
jmp 0x4cef22
push dword [0x6418a0]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.00570a18
add esp, 0xc
mov edi, eax
test edi, edi
je 0x4cefac
push dword [0x6418a0]
call fcn.0056dc69
pop ecx
test eax, eax
jne 0x4cefac
push dword [0x6418a0]
call fcn.0056dc95
pop ecx
test eax, eax
jne 0x4cefac
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0055fc70
pop ecx
pop ecx
test eax, eax
je 0x4cef5e
cmp dword [ebp + 0x14], ebx
je 0x4cef87
mov byte [eax], bl
jmp 0x4cef87
mov edi, dword [0x6418a0]
push edi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.00570a18
add esp, 0xc
test eax, eax
je 0x4cefac
lea eax, [ebp - 0xc]
push esi
push eax
call fcn.0055fc70
pop ecx
pop ecx
test eax, eax
je 0x4cef64
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x614]
push dword [ebp - 0x618]
call fcn.004ba492
add esp, 0xc
test eax, eax
push 1
pop edi
cmovns ebx, edi
jmp 0x4cefaf
xor edi, edi
inc edi
mov eax, dword [0x6418ac]
cmp eax, 2
mov esi, dword [ebp + 0x10]
push 0xffffffffffffffff
pop eax
cmove ebx, eax
test esi, esi
jne 0x4cefd6
push 0x5a32cc
push dword [0x6418a4]
call fcn.00455402
pop ecx
pop ecx
mov eax, dword [0x6418b0]
cmp eax, 2
jl 0x4cf00b
test esi, esi
jne 0x4cf00b
cmp dword [0x6418a8], esi
je 0x4cf00b
mov eax, dword [0x641898]
push eax
push 0xfffffffffffffff6
mov dword [0x64189c], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x6418b0]
cmp eax, edi
jl 0x4cf014
call fcn.004ceca9
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.0045d09e
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005462f1
leave
ret
call fcn.00547481
int3