Function at 0x4c94ba
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x62fff4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, 0x4c97fd
mov dword [ebp - 0x618], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push esi
push 0x16
mov dword [ebp - 0x614], eax
mov dword [0x63943c], ebx
mov dword [0x639440], ebx
call fcn.0056c4e8
push esi
push 8
mov dword [0x639400], eax
call fcn.0056c4e8
push esi
push 4
mov dword [0x6393c8], eax
call fcn.0056c4e8
push esi
push 2
mov dword [0x6393b8], eax
call fcn.0056c4e8
push esi
push 0xb
mov dword [0x6393b0], eax
call fcn.0056c4e8
push esi
push 0xf
mov dword [0x6393d4], eax
call fcn.0056c4e8
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x6393e4], eax
xor eax, eax
inc eax
mov dword [0x639440], eax
cmp dword [ebp + 0x10], ebx
jne 0x4c957a
cmp dword [0x639438], ebx
je 0x4c957a
mov eax, dword [0x639428]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x63942c], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0xa
mov dword [0x639440], 2
mov byte [ebp - 0x20c], bl
pop esi
cmp dword [0x639438], ebx
je 0x4c96bd
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 0x4c965e
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x4c976b
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4c9604
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x4c9604
cmp word [ebp + eax*2 - 0x60e], si
jne 0x4c9604
mov word [ebp + eax*2 - 0x610], si
dec eax
mov dword [ebp - 0x610], eax
add eax, eax
cmp eax, 0x400
jae 0x4c97f7
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.00457860
pop ecx
pop ecx
jmp 0x4c96d9
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x4c976b
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x4c96a6
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x4c96a6
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x4c96a6
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 0x610], eax
cmp eax, 0x200
jae 0x4c97f7
push 0xa
mov byte [ebp + eax - 0x20c], bl
pop esi
jmp 0x4c96e1
push dword [0x639430]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.0056b1c8
add esp, 0xc
mov edi, eax
test edi, edi
je 0x4c976b
push dword [0x639430]
call fcn.00568419
pop ecx
test eax, eax
jne 0x4c976b
push dword [0x639430]
call fcn.00568445
pop ecx
test eax, eax
jne 0x4c976b
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0055a420
pop ecx
pop ecx
test eax, eax
je 0x4c971d
cmp dword [ebp + 0x14], ebx
je 0x4c9746
mov byte [eax], bl
jmp 0x4c9746
mov edi, dword [0x639430]
push edi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.0056b1c8
add esp, 0xc
test eax, eax
je 0x4c976b
lea eax, [ebp - 0xc]
push esi
push eax
call fcn.0055a420
pop ecx
pop ecx
test eax, eax
je 0x4c9723
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x614]
push dword [ebp - 0x618]
call fcn.004b4c51
add esp, 0xc
test eax, eax
push 1
pop edi
cmovns ebx, edi
jmp 0x4c976e
xor edi, edi
inc edi
mov eax, dword [0x63943c]
cmp eax, 2
mov esi, dword [ebp + 0x10]
push 0xffffffffffffffff
pop eax
cmove ebx, eax
test esi, esi
jne 0x4c9795
push 0x59c37c
push dword [0x639434]
call fcn.0044fbc4
pop ecx
pop ecx
mov eax, dword [0x639440]
cmp eax, 2
jl 0x4c97ca
test esi, esi
jne 0x4c97ca
cmp dword [0x639438], esi
je 0x4c97ca
mov eax, dword [0x639428]
push eax
push 0xfffffffffffffff6
mov dword [0x63942c], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x639440]
cmp eax, edi
jl 0x4c97d3
call fcn.004c9468
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.00457860
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00540aaa
leave
ret
call fcn.00541c31
int3