Function at 0x40c5ca
Capabilities:
Manipulate console buffer
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x3c], eax
push edi
mov esi, ecx
mov dword [ebp - 0x48], ebx
xor edi, edi
mov ecx, ebx
mov dword [ebp - 0x44], edi
call fcn.0041269c
test eax, eax
je 0x40c6b9
push ebx
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov ebx, eax
lea eax, [ebp - 0x1c]
pop ecx
push eax
push ebx
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x40c6b9
movsx eax, word [ebp - 0x10]
movsx edi, word [ebp - 0xc]
sub edi, eax
dec edi
mov dword [ebp - 0x44], edi
push dword [ebp - 0x3c]
and dword [ebp - 0x38], 0
mov ecx, esi
push dword [ebp + 8]
call fcn.0040c6f4
mov ecx, eax
mov edx, 0x43b980
mov dword [ebp - 0x3c], ecx
mov esi, ecx
mov dword [ebp - 0x40], edx
test ecx, ecx
je 0x40c6ef
test ebx, ebx
je 0x40c6c0
cmp byte [0x448065], 0
jne 0x41ad2a
mov esi, 0xa0
cmp ecx, 0xa0
ja 0x40c673
mov esi, ecx
push 0
lea eax, [ebp - 0x38]
push eax
push esi
push edx
push ebx
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x40c6e7
xor eax, eax
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
sub ecx, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ecx
lea edx, [edx + esi*2]
mov dword [ebp - 0x40], edx
jne 0x40c653
test eax, eax
jne 0x41ae5d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416fd0
mov esp, ebp
pop ebp
ret 8
xor ebx, ebx
jmp 0x40c62b
lea ecx, [ebp - 0x54]
push ecx
mov ecx, dword [ebp - 0x48]
lea eax, [esi + esi]
push eax
call fcn.004127c8
test eax, eax
je 0x40c6dc
lea eax, [esi + esi]
cmp dword [ebp - 0x54], eax
je 0x40c686
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [ebp - 0x38], eax
jmp 0x40c69e
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x40c688
mov eax, dword [ebp - 0x38]
jmp 0x40c69e
mov ecx, dword [0x44851c]
cmp ecx, edi
jb 0x41ae01
lea eax, [ebp - 0x1c]
xor esi, esi
push eax
push ebx
mov dword [0x44851c], esi
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x41adf8
push esi
lea eax, [ebp - 0x38]
push eax
push dword [0x448514]
push dword [0x448518]
push ebx
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x41adf8
push 0xfffffffffffffff6
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetStdHandle]
push eax
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_FlushConsoleInputBuffer]
lea eax, [ebp - 0x4c]
push eax
push ebx
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
push esi
push ebx
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_SetConsoleMode]
call dword [sym.imp.msvcrt.dll__getch]
push dword [ebp - 0x4c]
movzx edi, ax
push ebx
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_SetConsoleMode]
lea eax, [ebp - 0x34]
push eax
push ebx
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
movsx ecx, word [ebp - 0x16]
lea eax, [ebp - 0x38]
movsx edx, word [ebp - 0x1c]
movsx esi, word [ebp - 0x34]
imul edx, ecx
movsx ecx, word [ebp - 0x2e]
push eax
mov eax, dword [ebp - 0x18]
imul esi, ecx
push eax
cwde
sub esi, edx
add esi, eax
movsx eax, word [ebp - 0x30]
add esi, eax
push esi
push 0x20
push ebx
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_FillConsoleOutputCharacterW]
push dword [ebp - 0x18]
push ebx
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_SetConsoleCursorPosition]
cmp edi, 3
je 0x41ae34
mov edi, dword [ebp - 0x44]
mov ecx, dword [0x44851c]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
mov esi, edx
lea eax, [edx + eax*2]
mov dword [ebp - 0x50], eax
cmp edx, eax
jae 0x41ae2b
cmp ecx, edi
jae 0x41ae25
movzx eax, word [esi]
add esi, 2
cmp eax, 0xa
jne 0x41ae20
inc ecx
cmp esi, dword [ebp - 0x50]
jb 0x41ae10
mov dword [0x44851c], ecx
sub esi, edx
sar esi, 1
jmp 0x40c673
push dword [0x433858]
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
push dword [0x433858]
mov dword [0x42d544], 1
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x40c6a6
cmp dword [ebp - 0x48], 2
jne 0x40c6a6
push 0
call fcn.00414b60
test eax, eax
je 0x41ae67
push 1
call dword [sym.imp.msvcrt.dll_exit]
int3