Function at 0x5f62a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x620
call fcn.006499b0
mov eax, dword [0x71d770]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0x1ff
mov dword [ebp - 4], 0
xor eax, eax
cmp dword [ebp + 0x10], 0
sete al
mov dword [ebp - 0x10], eax
mov dword [0x71feac], 0
mov dword [ebp - 8], 0
mov dword [0x71fea0], 0
call fcn.005f6810
mov dword [0x71fea0], 1
cmp dword [ebp + 0x10], 0
jne 0x5f6316
mov ecx, dword [ebp + 8]
push ecx
call fcn.005f6710
add esp, 4
test eax, eax
jne 0x5f6316
jmp 0x5f655e
mov dword [0x71fea0], 2
mov byte [ebp - 0x218], 0
cmp dword [0x71fe9c], 0
je 0x5f64af
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x5f6423
push 0
lea edx, [ebp - 0x21c]
push edx
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x620]
push ecx
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x5f641e
cmp dword [ebp - 0x21c], 2
jb 0x5f63c7
mov edx, dword [ebp - 0x21c]
movzx eax, word [ebp + edx*2 - 0x624]
cmp eax, 0xd
jne 0x5f63c7
mov ecx, dword [ebp - 0x21c]
movzx edx, word [ebp + ecx*2 - 0x622]
cmp edx, 0xa
jne 0x5f63c7
mov eax, 0xa
mov ecx, dword [ebp - 0x21c]
mov word [ebp + ecx*2 - 0x624], ax
mov edx, dword [ebp - 0x21c]
sub edx, 1
mov dword [ebp - 0x21c], edx
xor eax, eax
mov ecx, dword [ebp - 0x21c]
mov word [ebp + ecx*2 - 0x620], ax
push 0
push 0
push 0x200
lea edx, [ebp - 0x218]
push edx
push 0xffffffffffffffff
lea eax, [ebp - 0x620]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x5f640a
lea ecx, [ebp - 0x218]
mov dword [ebp - 4], ecx
push 0x400
lea edx, [ebp - 0x620]
push edx
call fcn.0047f930
add esp, 8
jmp 0x5f64ad
push 0
lea eax, [ebp - 0x21c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
lea edx, [ebp - 0x218]
push edx
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x5f64ad
cmp dword [ebp - 0x21c], 2
jb 0x5f6496
mov eax, dword [ebp - 0x21c]
movsx ecx, byte [ebp + eax - 0x21a]
cmp ecx, 0xd
jne 0x5f6496
mov edx, dword [ebp - 0x21c]
movsx eax, byte [ebp + edx - 0x219]
cmp eax, 0xa
jne 0x5f6496
mov ecx, dword [ebp - 0x21c]
mov byte [ebp + ecx - 0x21a], 0xa
mov edx, dword [ebp - 0x21c]
sub edx, 1
mov dword [ebp - 0x21c], edx
mov eax, dword [ebp - 0x21c]
mov byte [ebp + eax - 0x218], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 4], ecx
jmp 0x5f64cc
mov edx, dword [0x71fea8]
push edx
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x218]
push ecx
call fcn.00651394
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x5f64d7
jmp 0x5f655e
mov edx, dword [0x71fea8]
push edx
call fcn.0064f41a
add esp, 4
test eax, eax
je 0x5f64ec
jmp 0x5f655e
mov eax, dword [0x71fea8]
push eax
call fcn.0064f44e
add esp, 4
test eax, eax
je 0x5f6500
jmp 0x5f655e
push 0xa
lea ecx, [ebp - 0x218]
push ecx
call fcn.0064e0f0
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x5f6528
cmp dword [ebp + 0x14], 0
je 0x5f6526
mov edx, dword [ebp - 4]
mov byte [edx], 0
jmp 0x5f653c
mov eax, dword [0x71fea8]
push eax
call fcn.005f65f0
add esp, 4
test eax, eax
jne 0x5f653c
jmp 0x5f655e
lea ecx, [ebp - 0x218]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00597450
add esp, 0xc
test eax, eax
jl 0x5f655e
mov dword [ebp - 8], 1
cmp dword [0x71feac], 2
jne 0x5f656e
mov dword [ebp - 8], 0xffffffff
cmp dword [ebp - 0x10], 0
je 0x5f6588
push 0x6a604c
mov ecx, dword [0x71fea4]
push ecx
call fcn.0065402e
add esp, 8
cmp dword [0x71fea0], 2
jl 0x5f65ae
cmp dword [ebp + 0x10], 0
jne 0x5f65ae
mov edx, dword [ebp + 8]
push edx
call fcn.005f6760
add esp, 4
test eax, eax
jne 0x5f65ae
mov dword [ebp - 8], 0
cmp dword [0x71fea0], 1
jl 0x5f65bc
call fcn.005f6890
push 0x200
lea eax, [ebp - 0x218]
push eax
call fcn.0047f930
add esp, 8
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0064815a
mov esp, ebp
pop ebp
ret