Function at 0x4ad0b40c
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.4ad03b84
test eax, eax
jne 0x4ad0d200
xor edi, edi
push dword [ebp + 0x14]
and dword [ebp - 4], 0
push dword [ebp + 0x10]
push 0x4ad0ba0c
push dword [ebp + 8]
call fcn.4ad0b4a9
mov ebx, eax
test ebx, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 0x4ad35d80
je 0x4ad0b495
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test edi, edi
jne 0x4ad0d23e
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call fcn.4ad05043
test eax, eax
je 0x4ad0d233
lea eax, [ebx + ebx]
cmp dword [ebp - 0x10], eax
jne 0x4ad0d233
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 0x4ad0b454
cmp dword [ebp - 4], 0
jne 0x4ad1381f
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 0x4ad0b425
movsx ecx, word [ebp - 0x1c]
movsx eax, word [ebp - 0x18]
nop
sub eax, ecx
dec eax
mov dword [ebp - 8], eax
jmp 0x4ad0b427
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4ad13817
cmp byte [0x4ad39d94], 0
jne 0x4ad1371b
mov ebx, 0xa0
cmp dword [ebp + 0x10], ebx
ja 0x4ad0d258
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
jne 0x4ad0b483
jmp 0x4ad137fd
mov eax, dword [0x4ad3a4f8]
cmp eax, dword [ebp - 8]
jb 0x4ad137c6
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
and dword [0x4ad3a4f8], 0
lea eax, [ebp - 0x28]
push eax
push edi
call ebx
test eax, eax
je 0x4ad137c6
push 0
lea eax, [ebp - 4]
push eax
push dword [0x4ad3a4f0]
push dword [0x4ad3a4f4]
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x4ad137c6
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.4ad1b3bf
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 0x4ad1380b
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
lea ecx, [eax + ecx*2]
jmp 0x4ad137ed
mov edx, dword [0x4ad3a4f8]
cmp edx, dword [ebp - 8]
jae 0x4ad137f1
mov dx, word [eax]
inc eax
inc eax
cmp dx, 0xa
jne 0x4ad137ed
inc dword [0x4ad3a4f8]
cmp eax, ecx
jb 0x4ad137d1
sub eax, dword [ebp + 0x14]
sar eax, 1
mov ebx, eax
jmp 0x4ad0d258
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4ad0b487
call fcn.4ad181ef
xor eax, eax
jmp 0x4ad0b4a2
mov dword [ebp - 4], eax
jmp 0x4ad0b495
cmp dword [ebp + 0xc], 2
jne 0x4ad0b49f
push 1
call fcn.4ad09f58
jmp 0x4ad0b49f