Function at 0x4cedf2
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x639034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, 0x4cf135
mov dword [ebp - 0x618], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push esi
push 0x16
mov dword [ebp - 0x614], eax
mov dword [0x6428ac], ebx
mov dword [0x6428b0], ebx
call fcn.00572068
push esi
push 8
mov dword [0x642870], eax
call fcn.00572068
push esi
push 4
mov dword [0x642838], eax
call fcn.00572068
push esi
push 2
mov dword [0x642828], eax
call fcn.00572068
push esi
push 0xb
mov dword [0x642820], eax
call fcn.00572068
push esi
push 0xf
mov dword [0x642844], eax
call fcn.00572068
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x642854], eax
xor eax, eax
inc eax
mov dword [0x6428b0], eax
cmp dword [ebp + 0x10], ebx
jne 0x4ceeb2
cmp dword [0x6428a8], ebx
je 0x4ceeb2
mov eax, dword [0x642898]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x64289c], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0xa
mov dword [0x6428b0], 2
mov byte [ebp - 0x20c], bl
pop esi
cmp dword [0x6428a8], ebx
je 0x4ceff5
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 0x4cef96
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x4cf0a3
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4cef3c
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x4cef3c
cmp word [ebp + eax*2 - 0x60e], si
jne 0x4cef3c
mov word [ebp + eax*2 - 0x610], si
dec eax
mov dword [ebp - 0x610], eax
add eax, eax
cmp eax, 0x400
jae 0x4cf12f
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.0045d198
pop ecx
pop ecx
jmp 0x4cf011
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x4cf0a3
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4cefde
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x4cefde
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x4cefde
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 0x610], eax
cmp eax, 0x200
jae 0x4cf12f
push 0xa
mov byte [ebp + eax - 0x20c], bl
pop esi
jmp 0x4cf019
push dword [0x6428a0]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.00570d48
add esp, 0xc
mov edi, eax
test edi, edi
je 0x4cf0a3
push dword [0x6428a0]
call fcn.0056df99
pop ecx
test eax, eax
jne 0x4cf0a3
push dword [0x6428a0]
call fcn.0056dfc5
pop ecx
test eax, eax
jne 0x4cf0a3
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0055ffa0
pop ecx
pop ecx
test eax, eax
je 0x4cf055
cmp dword [ebp + 0x14], ebx
je 0x4cf07e
mov byte [eax], bl
jmp 0x4cf07e
mov edi, dword [0x6428a0]
push edi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.00570d48
add esp, 0xc
test eax, eax
je 0x4cf0a3
lea eax, [ebp - 0xc]
push esi
push eax
call fcn.0055ffa0
pop ecx
pop ecx
test eax, eax
je 0x4cf05b
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x614]
push dword [ebp - 0x618]
call fcn.004ba587
add esp, 0xc
test eax, eax
push 1
pop edi
cmovns ebx, edi
jmp 0x4cf0a6
xor edi, edi
inc edi
mov eax, dword [0x6428ac]
cmp eax, 2
mov esi, dword [ebp + 0x10]
push 0xffffffffffffffff
pop eax
cmove ebx, eax
test esi, esi
jne 0x4cf0cd
push 0x5a32cc
push dword [0x6428a4]
call fcn.004554f9
pop ecx
pop ecx
mov eax, dword [0x6428b0]
cmp eax, 2
jl 0x4cf102
test esi, esi
jne 0x4cf102
cmp dword [0x6428a8], esi
je 0x4cf102
mov eax, dword [0x642898]
push eax
push 0xfffffffffffffff6
mov dword [0x64289c], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x6428b0]
cmp eax, edi
jl 0x4cf10b
call fcn.004ceda0
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.0045d198
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00546623
leave
ret
call fcn.005477b1
int3