Function at 0x6b58edf0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, ecx
sub esp, 0x64c
mov dword [0x6b62cc00], 0
mov dword [esp + 4], sym._recsig
mov dword [esp], 0x16
mov dword [esp + 0x28], eax
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [esp + 0x63c], eax
xor eax, eax
mov dword [0x6b62cc04], 0
call sym._signal
mov dword [esp + 4], sym._recsig
mov dword [esp], 8
mov dword [0x6b62cc78], eax
call sym._signal
mov dword [esp + 4], sym._recsig
mov dword [esp], 4
mov dword [0x6b62cc40], eax
call sym._signal
mov dword [esp + 4], sym._recsig
mov dword [esp], 2
mov dword [0x6b62cc30], eax
call sym._signal
mov dword [esp + 4], sym._recsig
mov dword [esp], 0xb
mov dword [0x6b62cc28], eax
call sym._signal
mov dword [esp + 4], sym._recsig
mov dword [esp], 0xf
mov dword [0x6b62cc4c], eax
call sym._signal
mov dword [0x6b62cc00], 1
mov dword [0x6b62cc5c], eax
test ebx, ebx
je 0x6b58f058
mov eax, dword [0x6b62cc08]
mov byte [esp + 0x43c], 0
mov dword [0x6b62cc00], 2
test eax, eax
je 0x6b58f077
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
sub esp, 0xc
mov dword [esp], 0xfffffff6
test eax, eax
je 0x6b58eff0
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
lea ecx, [esp + 0x36]
lea edx, [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1ff
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
sub esp, 0x14
test eax, eax
mov esi, eax
lea ebp, [esp + 0x43c]
lea ecx, [esp + 0x36]
je 0x6b58f110
mov eax, dword [esp + 0x30]
cmp eax, 1
jbe 0x6b58ef7c
cmp word [esp + eax*2 + 0x32], 0xd
lea edx, [eax - 2]
je 0x6b58f2a0
xor esi, esi
lea ebp, [esp + 0x43c]
mov word [esp + eax*2 + 0x36], si
mov dword [esp + 8], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x200
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
test eax, eax
lea ecx, [esp + 0x36]
mov dword [esp + 4], 0x400
mov dword [esp], ecx
jle 0x6b58f290
call sym.libcrypto_1_1.dll_OPENSSL_cleanse
jmp 0x6b58f09f
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
lea edx, [esp + 0x30]
lea ebp, [esp + 0x43c]
mov dword [esp], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1ff
mov dword [esp + 4], ebp
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
sub esp, 0x14
mov esi, eax
test eax, eax
je 0x6b58f110
mov eax, dword [esp + 0x30]
cmp eax, 1
jbe 0x6b58f049
cmp byte [esp + eax + 0x43a], 0xd
je 0x6b58f2c8
mov byte [esp + eax + 0x43c], 0
jmp 0x6b58f09f
mov eax, dword [0x6b62cc08]
test eax, eax
jne 0x6b58f258
mov dword [0x6b62cc00], 2
mov byte [esp + 0x43c], 0
mov eax, dword [0x6b62cc10]
lea ebp, [esp + 0x43c]
mov dword [esp + 4], 0x1ff
mov dword [esp], ebp
mov dword [esp + 8], eax
call sym._fgets
test eax, eax
je 0x6b58f168
mov eax, dword [0x6b62cc10]
mov dword [esp], eax
call sym._feof
test eax, eax
jne 0x6b58f168
mov eax, dword [0x6b62cc10]
mov dword [esp], eax
call sym._ferror
mov esi, eax
test eax, eax
jne 0x6b58f168
mov dword [esp + 4], 0xa
mov dword [esp], ebp
call sym._strchr
test eax, eax
je 0x6b58f2f0
mov edx, dword [esp + 0x660]
test edx, edx
je 0x6b58f0f1
mov byte [eax], 0
mov eax, dword [esp + 0x28]
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], eax
call sym.libcrypto_1_1.dll_UI_set_result
not eax
shr eax, 0x1f
mov esi, eax
lea esi, [esi]
mov eax, dword [0x6b62cc04]
cmp eax, 2
mov eax, 0xffffffff
cmove esi, eax
test ebx, ebx
je 0x6b58f1f8
mov eax, dword [0x6b62cc00]
test eax, eax
jg 0x6b58f170
mov dword [esp + 4], 0x200
mov dword [esp], ebp
call sym.libcrypto_1_1.dll_OPENSSL_cleanse
mov eax, dword [esp + 0x63c]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
jne 0x6b58f349
add esp, 0x64c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x6b58f110
mov eax, dword [0x6b62cc78]
mov dword [esp], 0x16
mov dword [esp + 4], eax
call sym._signal
mov eax, dword [0x6b62cc40]
mov dword [esp], 8
mov dword [esp + 4], eax
call sym._signal
mov eax, dword [0x6b62cc30]
mov dword [esp], 4
mov dword [esp + 4], eax
call sym._signal
mov eax, dword [0x6b62cc28]
mov dword [esp], 2
mov dword [esp + 4], eax
call sym._signal
mov eax, dword [0x6b62cc4c]
mov dword [esp], 0xb
mov dword [esp + 4], eax
call sym._signal
mov eax, dword [0x6b62cc5c]
mov dword [esp], 0xf
mov dword [esp + 4], eax
call sym._signal
jmp 0x6b58f131
mov eax, dword [0x6b62cc0c]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sym._fputc
mov eax, dword [0x6b62cc00]
cmp eax, 1
jle 0x6b58f12d
mov eax, dword [0x6b62cc08]
test eax, eax
je 0x6b58f170
mov ebx, dword [0x6b62cc14]
mov dword [esp], 0xfffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
sub esp, 8
jmp 0x6b58f128
mov ebp, dword [0x6b62cc14]
mov dword [esp], 0xfffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 4
and ebp, 0xfffffffb
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
sub esp, 8
jmp 0x6b58eecc
call sym.libcrypto_1_1.dll_OPENSSL_cleanse
xor esi, esi
jmp 0x6b58f110
cmp word [esp + eax*2 + 0x34], 0xa
lea ebp, [eax - 1]
jne 0x6b58ef7c
mov eax, 0xa
mov dword [esp + 0x30], ebp
mov word [esp + edx*2 + 0x36], ax
mov eax, ebp
jmp 0x6b58ef7c
cmp byte [esp + eax + 0x43b], 0xa
lea ecx, [eax - 1]
jne 0x6b58f049
mov byte [esp + eax + 0x43a], 0xa
mov eax, ecx
jmp 0x6b58f049
mov eax, dword [0x6b62cc10]
mov dword [esp + 0x2c], edi
mov edi, eax
jmp 0x6b58f31b
lea eax, [esp + 0x437]
mov dword [esp + 4], 0xa
mov dword [esp], eax
call sym._strchr
test eax, eax
jne 0x6b58f340
lea eax, [esp + 0x437]
mov dword [esp + 8], edi
mov dword [esp + 4], 4
mov dword [esp], eax
call sym._fgets
test eax, eax
jne 0x6b58f300
jmp 0x6b58f110
mov edi, dword [esp + 0x2c]
jmp 0x6b58f0f1
call sym.___stack_chk_fail
nop