Function at 0x600627
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x904fe8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, 0x60096a
mov dword [ebp - 0x618], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push esi
push 0x16
mov dword [ebp - 0x614], eax
mov dword [0x963924], ebx
mov dword [0x963928], ebx
call fcn.0074f501
push esi
push 8
mov dword [0x9638e8], eax
call fcn.0074f501
push esi
push 4
mov dword [0x9638b0], eax
call fcn.0074f501
push esi
push 2
mov dword [0x9638a0], eax
call fcn.0074f501
push esi
push 0xb
mov dword [0x963898], eax
call fcn.0074f501
push esi
push 0xf
mov dword [0x9638bc], eax
call fcn.0074f501
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x9638cc], eax
xor eax, eax
inc eax
mov dword [0x963928], eax
cmp dword [ebp + 0x10], ebx
jne 0x6006e7
cmp dword [0x963920], ebx
je 0x6006e7
mov eax, dword [0x963910]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x963914], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0xa
mov dword [0x963928], 2
mov byte [ebp - 0x20c], bl
pop esi
cmp dword [0x963920], ebx
je 0x60082a
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 0x6007cb
lea eax, [ebp - 0x60c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x6008d8
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x600771
cmp word [ebp + eax*2 - 0x610], 0xd
jne 0x600771
cmp word [ebp + eax*2 - 0x60e], si
jne 0x600771
mov word [ebp + eax*2 - 0x610], si
dec eax
mov dword [ebp - 0x610], eax
add eax, eax
cmp eax, 0x400
jae 0x600964
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.00562841
pop ecx
pop ecx
jmp 0x600846
lea eax, [ebp - 0x20c]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x6008d8
mov eax, dword [ebp - 0x610]
cmp eax, 2
jb 0x600813
cmp byte [ebp + eax - 0x20e], 0xd
jne 0x600813
cmp byte [ebp + eax - 0x20d], 0xa
jne 0x600813
mov byte [ebp + eax - 0x20e], 0xa
dec eax
mov dword [ebp - 0x610], eax
cmp eax, 0x200
jae 0x600964
push 0xa
mov byte [ebp + eax - 0x20c], bl
pop esi
jmp 0x60084e
push dword [0x963918]
lea eax, [ebp - 0x20c]
push 0x1ff
push eax
call fcn.007572f8
add esp, 0xc
mov edi, eax
test edi, edi
je 0x6008d8
push dword [0x963918]
call fcn.0074f6d0
pop ecx
test eax, eax
jne 0x6008d8
push dword [0x963918]
call fcn.0074f6fc
pop ecx
test eax, eax
jne 0x6008d8
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0073a2f0
pop ecx
pop ecx
test eax, eax
je 0x60088a
cmp dword [ebp + 0x14], ebx
je 0x6008b3
mov byte [eax], bl
jmp 0x6008b3
mov edi, dword [0x963918]
push edi
lea eax, [ebp - 0xc]
push 4
push eax
call fcn.007572f8
add esp, 0xc
test eax, eax
je 0x6008d8
lea eax, [ebp - 0xc]
push esi
push eax
call fcn.0073a2f0
pop ecx
pop ecx
test eax, eax
je 0x600890
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x614]
push dword [ebp - 0x618]
call fcn.005d5b18
add esp, 0xc
test eax, eax
push 1
pop edi
cmovns ebx, edi
jmp 0x6008db
xor edi, edi
inc edi
mov eax, dword [0x963924]
cmp eax, 2
mov esi, dword [ebp + 0x10]
push 0xffffffffffffffff
pop eax
cmove ebx, eax
test esi, esi
jne 0x600902
push 0x7e19c8
push dword [0x96391c]
call fcn.005439d4
pop ecx
pop ecx
mov eax, dword [0x963928]
cmp eax, 2
jl 0x600937
test esi, esi
jne 0x600937
cmp dword [0x963920], esi
je 0x600937
mov eax, dword [0x963910]
push eax
push 0xfffffffffffffff6
mov dword [0x963914], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x963928]
cmp eax, edi
jl 0x600940
call fcn.006005d5
lea eax, [ebp - 0x20c]
push 0x200
push eax
call fcn.00562841
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.007207bc
leave
ret
call fcn.0072188a
int3