Function at 0x4ad0688f
Capabilities:
Manipulate console buffer

Disassembly:
mov eax, dword [eax*4 + 0x4ad2faa4]
xor edx, edx
inc edx
shl edx, cl
and eax, edx
pop ebp
ret 4
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.4ad05b51
test eax, eax
jne 0x4ad08c99
xor edi, edi
push dword [ebp + 0x14]
and dword [ebp - 4], 0
push dword [ebp + 0x10]
push 0x4ad05d98
push dword [ebp + 8]
call fcn.4ad06933
mov ebx, eax
test ebx, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 0x4ad38ba0
je 0x4ad0691a
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test edi, edi
jne 0x4ad08cd6
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call fcn.4ad067f1
test eax, eax
je 0x4ad08ccb
lea eax, [ebx + ebx]
cmp dword [ebp - 0x10], eax
jne 0x4ad08ccb
and dword [ebp - 4], 0
sub dword [ebp + 0x10], ebx
mov eax, dword [ebp + 0x14]
lea eax, [eax + ebx*2]
mov dword [ebp + 0x14], eax
jne 0x4ad068d9
cmp dword [ebp - 4], 0
jne 0x4ad17083
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov edi, eax
pop ecx
lea eax, [ebp - 0x28]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad068aa
movsx ecx, word [ebp - 0x1c]
movsx eax, word [ebp - 0x18]
sub eax, ecx
dec eax
mov dword [ebp - 8], eax
jmp 0x4ad068ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad1707b
cmp byte [0x4ad3cbcc], 0
jne 0x4ad16f7f
mov ebx, 0xa0
cmp dword [ebp + 0x10], ebx
ja 0x4ad08cf0
mov ebx, dword [ebp + 0x10]
push 0
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x4ad17061
jmp 0x4ad06908
mov eax, dword [0x4ad3da20]
cmp eax, dword [ebp - 8]
jb 0x4ad1702a
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
and dword [0x4ad3da20], 0
lea eax, [ebp - 0x28]
push eax
push edi
call ebx
test eax, eax
je 0x4ad1702a
push 0
lea eax, [ebp - 4]
push eax
push dword [0x4ad3da18]
push dword [0x4ad3da1c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x4ad1702a
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
push edi
call esi
call dword [sym.imp.msvcrt.dll__getch]
push dword [ebp - 0xc]
mov dword [ebp + 8], eax
push edi
call esi
lea eax, [ebp - 0x40]
push eax
push edi
call ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.4ad1e061
push eax
push 0x20
push edi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
cmp word [ebp + 8], 3
je 0x4ad1706f
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
lea ecx, [eax + ecx*2]
jmp 0x4ad17051
mov edx, dword [0x4ad3da20]
cmp edx, dword [ebp - 8]
jae 0x4ad17055
mov dx, word [eax]
inc eax
inc eax
cmp dx, 0xa
jne 0x4ad17051
inc dword [0x4ad3da20]
cmp eax, ecx
jb 0x4ad17035
sub eax, dword [ebp + 0x14]
sar eax, 1
mov ebx, eax
jmp 0x4ad08cf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4ad0690c
call fcn.4ad0c5b0
xor eax, eax
jmp 0x4ad06927
mov dword [ebp - 4], eax
jmp 0x4ad0691a
cmp dword [ebp + 0xc], 2
jne 0x4ad06924
push 1
call fcn.4ad040f7
lea eax, [ecx - 0x20]
shr eax, 5
inc eax
mov edx, eax
neg edx
shl edx, 5
add ecx, edx
jmp 0x4ad03d0a