Function at 0x100247c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
mov eax, dword [0x10096268]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x10024b3f
mov eax, dword [0x10096008]
push edi
test eax, eax
jns 0x100248dd
mov edi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push str.TERM
call edi
add esp, 4
mov dword [ebp - 0x820], eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x100a7338], eax
cmp eax, 0xffffffff
je 0x10024867
lea ecx, [ebp - 0x82c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x10024838
mov dword [0x100a7338], 0xffffffff
jmp 0x10024867
mov eax, dword [0x100a7338]
cmp eax, 0xffffffff
je 0x10024867
lea ecx, [ebp - 0x81c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov eax, dword [ebp - 0x814]
mov word [0x100a7334], ax
and eax, 0xf0
mov word [0x100a7330], ax
push str.AV_LOG_FORCE_NOCOLOR
call edi
add esp, 4
test eax, eax
je 0x10024879
xor eax, eax
jmp 0x1002489a
push str.AV_LOG_FORCE_COLOR
call edi
add esp, 4
test eax, eax
je 0x1002488e
mov eax, 1
jmp 0x1002489a
xor eax, eax
cmp dword [0x100a7338], 0xffffffff
setne al
push str.AV_LOG_FORCE_256COLOR
mov dword [0x10096008], eax
call edi
add esp, 4
test eax, eax
jne 0x100248d0
mov eax, dword [ebp - 0x820]
test eax, eax
je 0x100248c9
push str.256color
push eax
call sub.VCRUNTIME140.dll_strstr
add esp, 8
test eax, eax
jne 0x100248d0
mov eax, dword [0x10096008]
jmp 0x100248dd
mov eax, dword [0x10096008]
shl eax, 8
mov dword [0x10096008], eax
xor ecx, ecx
mov edx, eax
cmp ebx, 4
cmove edx, ecx
mov ecx, dword [0x100a7338]
mov dword [ebp - 0x828], edx
cmp ecx, 0xffffffff
je 0x10024a77
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test edx, edx
je 0x1002491b
movzx eax, byte [ebx + 0x1007f5e4]
or ax, word [0x100a7330]
movzx eax, ax
push eax
push ecx
call edi
cmp byte [esi], 0
je 0x10024a49
nop dword [eax]
nop dword [eax + eax]
xor ecx, ecx
lea ebx, [ebp - 0x804]
mov dword [ebp - 0x820], ecx
nop
cmp ecx, 0x3ff
jae 0x10024a1d
mov cl, byte [esi]
test cl, cl
je 0x10024953
inc esi
xor edx, edx
movzx eax, cl
test cl, cl
cmove eax, edx
mov edi, eax
mov ecx, eax
shr edi, 1
and cl, 0xc0
and edi, 0x40
cmp cl, 0x80
je 0x100249f4
cmp eax, 0xfe
jae 0x100249f4
test edi, eax
je 0x100249b1
nop dword [eax]
mov dl, byte [esi]
test dl, dl
je 0x10024987
inc esi
test dl, dl
movzx ecx, dl
mov dword [ebp - 0x824], 0
cmove ecx, dword [ebp - 0x824]
add ecx, 0xffffff80
cmp ecx, 0x40
jae 0x100249f4
shl eax, 6
add eax, ecx
shl edi, 5
test eax, edi
jne 0x10024980
lea edi, [edi*2 - 1]
and edi, eax
movzx ecx, di
lea edx, [ebx + 2]
cmp edi, 0x10000
jb 0x100249fc
lea eax, [edi - 0x10000]
and ecx, 0x3ff
shr eax, 0xa
or ecx, 0xdc00
or eax, 0xd800
mov word [ebx], ax
mov ebx, edx
mov eax, 2
mov word [ebx], cx
add ebx, 2
jmp 0x10024a06
mov ecx, 0xfffd
lea edx, [ebx + 2]
mov word [ebx], cx
mov eax, 1
mov ebx, edx
mov ecx, dword [ebp - 0x820]
add ecx, eax
cmp byte [esi], 0
mov dword [ebp - 0x820], ecx
jne 0x10024940
push 0
lea eax, [ebp - 0x830]
push eax
push ecx
lea eax, [ebp - 0x804]
push eax
push dword [0x100a7338]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
cmp byte [esi], 0
jne 0x10024930
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp dword [ebp - 0x828], 0
je 0x10024b3e
movzx eax, word [0x100a7334]
push eax
push dword [0x100a7338]
call edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100014a1
mov esp, ebp
pop ebp
ret
cmp edx, 1
jne 0x10024ab8
movzx ecx, byte [ebx + 0x1007f5e4]
mov eax, ecx
shr ecx, 4
push esi
and eax, 0xf
push eax
push ecx
push str.e__u_3_um_se_0m
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.100017e9
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100014a1
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x10024af4
cmp eax, 0x100
jne 0x10024af4
push esi
push ecx
push 0
push str.e_48_5__ume_38_5__dm_se_0m
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.100017e9
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100014a1
mov esp, ebp
pop ebp
ret
cmp edx, 0x100
jne 0x10024b2b
push esi
push 0
push 0
push str.e_48_5__ume_38_5__um_se_0m
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.100017e9
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100014a1
mov esp, ebp
pop ebp
ret
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
add esp, 0xc
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.100014a1
mov esp, ebp
pop ebp
ret