Function at 0x4ad1b3d6
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x4ad1b3fa
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
mov dword [ebp - 0xc], eax
cmp byte [0x4ad24041], 0
push ebx
push esi
push edi
je 0x4ad1b722
cmp word [0x4ad24060], 0x20
jae 0x4ad1b722
cmp word [0x4ad24064], 0x20
jae 0x4ad1b722
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad1b722
mov eax, dword [ebp - 0x3c]
mov cl, byte [0x4ad24064]
mov dword [ebp - 8], eax
xor eax, eax
inc eax
xor edx, edx
shl eax, cl
mov cl, byte [0x4ad24060]
inc edx
shl edx, cl
xor esi, esi
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x24], esi
or eax, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], esi
call fcn.4ad20dfd
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], esi
mov ebx, dword [ebp + 0x14]
lea eax, [ebp - 0x28]
push eax
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
cmp dword [0x4ad2415c], esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
je 0x4ad1b4b9
call fcn.4ad02fd7
cmp dword [ebp - 4], esi
je 0x4ad1b4b6
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], esi
cmp dword [ebp - 0x18], esi
je 0x4ad1b4f0
mov dword [ebp + 0xc], esi
xor eax, eax
or esi, 0xffffffff
or edx, 0xffffffff
cmp dword [ebx], eax
jbe 0x4ad1b4ee
movzx ecx, word [edi + eax*2]
cmp cx, 0xd
je 0x4ad1b50e
cmp cx, word [0x4ad24060]
je 0x4ad1b512
cmp cx, word [0x4ad24064]
je 0x4ad1b516
inc eax
cmp eax, dword [ebx]
jb 0x4ad1b4cd
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4ad1b506
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x18]
jmp 0x4ad1b736
mov edx, eax
jmp 0x4ad1b51f
mov esi, eax
jmp 0x4ad1b524
mov esi, eax
mov dword [ebp + 0xc], 1
cmp edx, 0xffffffff
jne 0x4ad1b4ee
cmp esi, 0xffffffff
je 0x4ad1b4ee
mov ecx, dword [ebp - 4]
mov dword [ebx], esi
xor ebx, ebx
cmp ecx, ebx
mov word [edi + esi*2], bx
je 0x4ad1b569
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4ad1b560
cmp dx, bx
je 0x4ad1b55c
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4ad1b560
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4ad1b53a
xor eax, eax
jmp 0x4ad1b565
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4ad1b56c
xor ebx, ebx
inc ebx
cmp dword [ebp + 0xc], 0
jne 0x4ad1b619
cmp esi, 2
jbe 0x4ad1b619
push 3
push 0x4ad1b790
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 3
push 0x4ad1b788
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 3
push 0x4ad1b780
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 6
push 0x4ad1b770
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 6
push 0x4ad1b760
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 6
push 0x4ad1b750
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1b612
push 6
push 0x4ad1b740
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad1b619
mov dword [ebp + 0xc], 1
mov eax, dword [ebp - 0x1c]
push ebx
push dword [ebp + 0xc]
shr eax, 4
not eax
and eax, 1
push eax
push esi
push dword [ebp + 0x10]
push edi
call fcn.4ad2119c
test eax, eax
je 0x4ad1b6a9
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad1b660
movsx eax, word [ebp - 8]
movsx ecx, word [ebp - 0x40]
add eax, esi
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x3a]
sub ecx, eax
mov word [ebp - 6], cx
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1b665
push dword [ebp - 8]
sub eax, edx
sar eax, 1
push ebx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
push 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x10]
jmp 0x4ad1b6c4
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1b6b6
sub eax, edx
sar eax, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0x24], eax
je 0x4ad1b6df
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1b6e4
sub eax, edx
sar eax, 1
lea esi, [eax + 1]
lea eax, [esi + esi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
je 0x4ad1b71e
push edi
push esi
push eax
call fcn.4ad01416
xor esi, esi
jmp 0x4ad1b476
xor eax, eax
jmp 0x4ad1b736
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
pop edi
pop esi
pop ebx
leave
ret 0x10