Function at 0x4ad134e2
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 0x4ad14235
cmp byte [0x4ad24081], 0
push ebx
push esi
push edi
je 0x4ad144e1
cmp word [0x4ad240a0], 0x20
jae 0x4ad144e1
cmp word [0x4ad240a4], 0x20
jae 0x4ad144e1
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad144e1
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.4ad13599
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 0x4ad14246
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
mov dword [ebp - 0xc], eax
jmp 0x4ad134fe
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
cmp dword [0x4ad241b4], esi
je 0x4ad14274
call fcn.4ad01e6c
cmp dword [ebp - 4], esi
je 0x4ad14271
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 0x4ad142ab
mov dword [ebp + 0xc], esi
xor eax, eax
or esi, 0xffffffff
or edx, 0xffffffff
cmp dword [ebx], eax
jbe 0x4ad142a9
movzx ecx, word [edi + eax*2]
cmp cx, 0xd
je 0x4ad142c9
cmp cx, word [0x4ad240a0]
je 0x4ad142cd
cmp cx, word [0x4ad240a4]
je 0x4ad142d1
inc eax
cmp eax, dword [ebx]
jb 0x4ad14288
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4ad142c1
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 0x4ad144f5
mov edx, eax
jmp 0x4ad142da
mov esi, eax
jmp 0x4ad142df
mov esi, eax
mov dword [ebp + 0xc], 1
cmp edx, 0xffffffff
jne 0x4ad142a9
cmp esi, 0xffffffff
je 0x4ad142a9
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ebx], esi
mov word [edi + esi*2], ax
test ecx, ecx
je 0x4ad14328
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4ad1431b
test dx, dx
je 0x4ad14317
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4ad1431b
add eax, 4
add ecx, 4
test dx, dx
jne 0x4ad142f5
xor eax, eax
jmp 0x4ad14320
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4ad14328
xor ebx, ebx
jmp 0x4ad1432b
xor ebx, ebx
inc ebx
cmp dword [ebp + 0xc], 0
jne 0x4ad143d8
cmp esi, 2
jbe 0x4ad143d8
push 3
push 0x4ad1454c
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 3
push 0x4ad14544
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 3
push 0x4ad1453c
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 6
push 0x4ad1452c
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 6
push 0x4ad1451c
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 6
push 0x4ad1450c
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad143d1
push 6
push 0x4ad144fc
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad143d8
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.4ad21877
test eax, eax
je 0x4ad14468
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad1441f
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 0x4ad14424
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 0x4ad14483
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 0x4ad14475
sub eax, edx
sar eax, 1
cmp dword [ebp - 4], 0
mov dword [ebp - 0x24], eax
je 0x4ad1449e
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 0x4ad144a3
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 0x4ad144dd
push edi
push esi
push eax
call fcn.4ad0185a
xor esi, esi
jmp 0x4ad1357a
xor eax, eax
jmp 0x4ad144f5
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