Function at 0x4ad09edd
Capabilities:
Manipulate console buffer

Disassembly:
xor ebx, ebx
jmp 0x4ad09f25
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad19a3c
lea ecx, [ebp - 0x10]
push ecx
lea eax, [esi + esi]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call fcn.4ad04ae0
test eax, eax
je 0x4ad08702
lea eax, [esi + esi]
cmp dword [ebp - 0x10], eax
je 0x4ad09f8d
jmp 0x4ad08702
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.4ad04a32
test eax, eax
je 0x4ad086fb
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov ebx, eax
pop ecx
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad086fb
movsx ecx, word [ebp - 0x1c]
movsx eax, word [ebp - 0x18]
sub eax, ecx
dec eax
mov dword [ebp - 8], eax
push dword [ebp + 0x14]
and dword [ebp - 4], 0
push dword [ebp + 0x10]
push 0x4ad01b2c
push dword [ebp + 8]
call fcn.4ad09fb8
mov esi, eax
mov dword [ebp + 0x10], esi
mov dword [ebp + 0x14], 0x4ad34600
test esi, esi
je 0x4ad09f9f
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test ebx, ebx
je 0x4ad0870d
cmp byte [0x4ad40660], 0
jne 0x4ad1993f
mov esi, 0xa0
cmp dword [ebp + 0x10], esi
ja 0x4ad09f74
mov esi, dword [ebp + 0x10]
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x4ad19a22
and dword [ebp - 4], 0
sub dword [ebp + 0x10], esi
mov eax, dword [ebp + 0x14]
lea eax, [eax + esi*2]
mov dword [ebp + 0x14], eax
jne 0x4ad09f52
cmp dword [ebp - 4], 0
jne 0x4ad19a44
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov eax, dword [0x4ad4091c]
cmp eax, dword [ebp - 8]
jb 0x4ad199eb
and dword [0x4ad4091c], 0
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad199eb
push 0
lea eax, [ebp - 4]
push eax
push dword [0x4ad40914]
push dword [0x4ad40918]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x4ad199eb
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 ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
push ebx
call edi
call dword [sym.imp.msvcrt.dll__getch]
push dword [ebp - 0xc]
movzx esi, ax
push ebx
call edi
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.4ad1fb26
push eax
push 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push dword [ebp - 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
cmp si, 3
je 0x4ad19a30
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
lea ecx, [eax + ecx*2]
jmp 0x4ad19a12
mov edx, dword [0x4ad4091c]
cmp edx, dword [ebp - 8]
jae 0x4ad19a16
mov dx, word [eax]
inc eax
inc eax
cmp dx, 0xa
jne 0x4ad19a12
inc dword [0x4ad4091c]
cmp eax, ecx
jb 0x4ad199f6
sub eax, dword [ebp + 0x14]
sar eax, 1
mov esi, eax
jmp 0x4ad09f74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4ad09f91
call fcn.4ad1e2ea
xor eax, eax
jmp 0x4ad09fac
mov dword [ebp - 4], eax
jmp 0x4ad09f9f
cmp dword [ebp + 0xc], 2
jne 0x4ad09fa9
push 1
call fcn.4ad03b69
int3