Function at 0x4ad1335e
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]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x4ad1419e
cmp byte [0x4ad24081], 0
push ebx
push esi
push edi
je 0x4ad1444a
cmp word [0x4ad240a0], 0x20
jae 0x4ad1444a
cmp word [0x4ad240a4], 0x20
jae 0x4ad1444a
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad1444a
mov eax, dword [ebp - 0x3c]
mov cl, byte [0x4ad240a4]
mov dword [ebp - 8], eax
xor eax, eax
inc eax
xor edx, edx
shl eax, cl
mov cl, byte [0x4ad240a0]
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.4ad13415
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]
jmp 0x4ad141af
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
mov dword [ebp - 0xc], eax
jmp 0x4ad1337a
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
cmp dword [0x4ad241ac], esi
je 0x4ad141dd
call fcn.4ad01a2f
cmp dword [ebp - 4], esi
je 0x4ad141da
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 0x4ad14214
mov dword [ebp + 0xc], esi
xor eax, eax
or esi, 0xffffffff
or edx, 0xffffffff
cmp dword [ebx], eax
jbe 0x4ad14212
movzx ecx, word [edi + eax*2]
cmp cx, 0xd
je 0x4ad14232
cmp cx, word [0x4ad240a0]
je 0x4ad14236
cmp cx, word [0x4ad240a4]
je 0x4ad1423a
inc eax
cmp eax, dword [ebx]
jb 0x4ad141f1
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4ad1422a
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 0x4ad1445e
mov edx, eax
jmp 0x4ad14243
mov esi, eax
jmp 0x4ad14248
mov esi, eax
mov dword [ebp + 0xc], 1
cmp edx, 0xffffffff
jne 0x4ad14212
cmp esi, 0xffffffff
je 0x4ad14212
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ebx], esi
mov word [edi + esi*2], ax
test ecx, ecx
je 0x4ad14291
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4ad14284
test dx, dx
je 0x4ad14280
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4ad14284
add eax, 4
add ecx, 4
test dx, dx
jne 0x4ad1425e
xor eax, eax
jmp 0x4ad14289
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4ad14291
xor ebx, ebx
jmp 0x4ad14294
xor ebx, ebx
inc ebx
cmp dword [ebp + 0xc], 0
jne 0x4ad14341
cmp esi, 2
jbe 0x4ad14341
push 3
push 0x4ad144b8
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 3
push 0x4ad144b0
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 3
push 0x4ad144a8
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 6
push 0x4ad14498
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 6
push 0x4ad14488
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 6
push 0x4ad14478
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1433a
push 6
push 0x4ad14468
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad14341
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.4ad2167b
test eax, eax
je 0x4ad143d1
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad14388
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 0x4ad1438d
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 0x4ad143ec
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 0x4ad143de
sub eax, edx
sar eax, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0x24], eax
je 0x4ad14407
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 0x4ad1440c
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]
mov dword [ebp - 4], eax
test eax, eax
je 0x4ad14446
push edi
push esi
push eax
call fcn.4ad017fb
xor esi, esi
jmp 0x4ad133f6
xor eax, eax
jmp 0x4ad1445e
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