Function at 0x10228b70
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x618
call fcn.10231a20
mov eax, dword [0x102d4008]
xor eax, esp
mov dword [esp + 0x614], eax
mov eax, dword [esp + 0x61c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
xor ebx, ebx
push edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x630]
push 0x10228f10
push 0x16
mov dword [esp + 0x1c], eax
mov dword [0x102e1d14], 0
mov dword [0x102e1d18], ebx
call esi
push 0x10228f10
push 8
mov dword [0x102e1cd8], eax
call esi
push 0x10228f10
push 4
mov dword [0x102e1ca0], eax
call esi
push 0x10228f10
push 2
mov dword [0x102e1c90], eax
call esi
push 0x10228f10
push 0xb
mov dword [0x102e1c88], eax
call esi
push 0x10228f10
push 0xf
mov dword [0x102e1cac], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x30
mov dword [0x102e1cbc], eax
mov dword [0x102e1d18], 1
cmp dword [esp + 0x634], ebx
jne 0x10228c4b
cmp dword [0x102e1d10], ebx
je 0x10228c4b
mov eax, dword [0x102e1d00]
and eax, 0xfffffffb
push eax
push 0xfffffffffffffff6
mov dword [0x102e1d04], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
mov dword [0x102e1d18], 2
mov byte [esp + 0x24], bl
cmp dword [0x102e1d10], ebx
je 0x10228d7f
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
test eax, eax
lea eax, [esp + 0x14]
push eax
push 0x1ff
je 0x10228d35
lea eax, [esp + 0x230]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x10228e33
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x10228cda
cmp word [esp + eax*2 + 0x220], 0xd
jne 0x10228cda
cmp word [esp + eax*2 + 0x222], 0xa
jne 0x10228cda
mov ecx, 0xa
mov word [esp + eax*2 + 0x220], cx
dec eax
mov dword [esp + 0x10], eax
add eax, eax
cmp eax, 0x400
jae 0x10228f05
xor ecx, ecx
push ecx
push ecx
push 0x200
mov word [esp + eax + 0x230], cx
lea eax, [esp + 0x30]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x238]
push eax
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
lea edi, [esp + 0x24]
mov eax, ebx
cmovle edi, eax
lea eax, [esp + 0x224]
push 0x400
push eax
call fcn.10001320
add esp, 8
jmp 0x10228d96
lea eax, [esp + 0x30]
push eax
push 0xfffffffffffffff6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
test eax, eax
je 0x10228e33
mov eax, dword [esp + 0x10]
cmp eax, 2
jb 0x10228d6e
cmp byte [esp + eax + 0x22], 0xd
jne 0x10228d6e
cmp byte [esp + eax + 0x23], 0xa
jne 0x10228d6e
mov byte [esp + eax + 0x22], 0xa
dec eax
mov dword [esp + 0x10], eax
cmp eax, 0x200
jae 0x10228f05
mov byte [esp + eax + 0x24], bl
jmp 0x10228d9e
push dword [0x102e1d08]
lea eax, [esp + 0x28]
push 0x1ff
push eax
call ebp
add esp, 0xc
mov edi, eax
test edi, edi
je 0x10228e33
push dword [0x102e1d08]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
jne 0x10228e33
push dword [0x102e1d08]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
jne 0x10228e33
lea eax, [esp + 0x24]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x10228de8
cmp dword [esp + 0x638], ebx
je 0x10228e14
mov byte [eax], bl
jmp 0x10228e14
mov edi, dword [0x102e1d08]
nop
push edi
lea eax, [esp + 0x20]
push 4
push eax
call ebp
add esp, 0xc
test eax, eax
je 0x10228e33
lea eax, [esp + 0x1c]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x10228df0
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x18]
push dword [esp + 0x20]
call fcn.10219730
add esp, 0xc
mov ecx, 1
test eax, eax
cmovns ebx, ecx
mov eax, dword [0x102e1d14]
or ecx, 0xffffffff
mov edi, dword [esp + 0x634]
cmp eax, 2
cmove ebx, ecx
test edi, edi
jne 0x10228e5f
push 0x102b0668
push dword [0x102e1d0c]
call fcn.101a62b0
add esp, 8
mov eax, dword [0x102e1d18]
cmp eax, 2
jl 0x10228e94
test edi, edi
jne 0x10228e94
cmp dword [0x102e1d10], edi
je 0x10228e94
mov eax, dword [0x102e1d00]
push eax
push 0xfffffffffffffff6
mov dword [0x102e1d04], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [0x102e1d18]
cmp eax, 1
jl 0x10228ed8
push dword [0x102e1cd8]
push 0x16
call esi
push dword [0x102e1ca0]
push 8
call esi
push dword [0x102e1c90]
push 4
call esi
push dword [0x102e1c88]
push 2
call esi
push dword [0x102e1cac]
push 0xb
call esi
push dword [0x102e1cbc]
push 0xf
call esi
add esp, 0x30
lea eax, [esp + 0x24]
push 0x200
push eax
call fcn.10001320
mov ecx, dword [esp + 0x62c]
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1010f56f
add esp, 0x618
ret
call fcn.1010feb4
int3