Function at 0x10005000
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], 1
or eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x10], eax
mov esi, dword [0x100105c8]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdq
idiv esi
test edx, edx
jne 0x10005104
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push edi
call fcn.10007610
imul ecx, dword [ebx + 0x18], 0x1d
add ecx, dword [ebx + 0x1c]
nop dword [eax]
mov esi, dword [ecx*4 + 0x10010f10]
mov eax, 0x8d3dcb09
imul esi
mov dword [ebp - 0x20], esi
add edx, esi
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
imul eax, ebx, 0x1d
sub esi, eax
cmp ebx, dword [edi + 0x18]
jne 0x100050c2
cmp esi, dword [edi + 0x1c]
jne 0x100050c2
mov eax, 0x8d3dcb09
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
imul eax, eax, 0x1d
sub ecx, eax
cmp edx, ebx
jne 0x100050ac
lea eax, [esi - 1]
cmp ecx, eax
je 0x100050db
lea eax, [esi + 1]
cmp ecx, eax
je 0x100050c7
lea eax, [ebx - 1]
cmp edx, eax
jne 0x100050b7
cmp ecx, esi
je 0x100050ec
lea eax, [ebx + 1]
cmp edx, eax
jne 0x100050c2
cmp ecx, esi
je 0x100050fd
mov ecx, dword [ebp - 0x20]
jmp 0x10005050
mov edx, 1
inc dword [edi + 0x1c]
mov dword [edi + 0x24], 1
jmp case.default.0x1000516a
xor edx, edx
dec dword [edi + 0x1c]
mov dword [edi + 0x24], 0
jmp case.default.0x1000516a
mov edx, 2
dec dword [edi + 0x18]
mov dword [edi + 0x24], 2
jmp case.default.0x1000516a
mov edx, 3
jmp 0x10005165
mov esi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov bl, 1
nop dword [eax]
call esi
mov edx, eax
and edx, 0x80000003
jns 0x10005121
dec edx
or edx, 0xfffffffc
inc edx
mov eax, dword [edi + 0x24]
cmp eax, 3
ja case.default.0x10005129
jmp dword [eax*4 + 0x100052a8]
xor ecx, ecx
movzx eax, bl
cmp edx, 1
cmove ecx, eax
mov bl, cl
jmp 0x10005161
xor ecx, ecx
movzx eax, bl
test edx, edx
cmove ecx, eax
mov bl, cl
jmp 0x10005161
xor ecx, ecx
movzx eax, bl
cmp edx, 3
cmove ecx, eax
mov bl, cl
jmp 0x10005161
cmp edx, 2
jne 0x10005165
test bl, bl
jne case.default.0x10005129
cmp edx, 3
ja case.default.0x1000516a
jmp dword [edx*4 + 0x100052b8]
inc dword [edi + 0x18]
mov dword [edi + 0x24], 3
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
test eax, eax
js 0x1000522b
test ecx, ecx
js 0x1000522b
cmp eax, 0x1d
jge 0x1000522b
cmp ecx, 0x1d
jge 0x1000522b
imul eax, eax, 0x1d
add eax, ecx
mov ecx, dword [ebp + 8]
lea eax, [eax + eax*4]
cmp dword [ecx + eax*8 + 0x24], 1
je 0x1000522b
imul eax, dword [ebp - 0xc], 0x1d
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], edx
add eax, dword [ebp - 0x10]
lea eax, [eax + eax*4]
push dword [ecx + eax*8 + 0x20]
lea esi, [ecx + eax*8]
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx eax, word [esi + 0x18]
add ax, ax
mov word [ebp - 8], ax
movzx eax, word [esi + 0x1c]
mov word [ebp - 6], ax
push dword [ebp - 8]
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
cmp dword [esi + 0x14], 0xf
mov edx, esi
jbe 0x10005209
mov edx, dword [esi]
push dword [esi + 0x10]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.10004b80
add esp, 4
push 0xf
push 0xfffffffffffffff5
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push eax
call esi
jmp 0x10005243
mov eax, dword [ebp - 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x1c], eax
push dword [edi + 0x20]
push 0xfffffffffffffff5
call ebx
push eax
call esi
movzx eax, word [edi + 0x18]
add ax, ax
mov word [ebp - 0x14], ax
movzx eax, word [edi + 0x1c]
mov word [ebp - 0x12], ax
push dword [ebp - 0x14]
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
cmp dword [edi + 0x14], 0xf
mov edx, edi
jbe 0x10005278
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.10004b80
add esp, 4
push 0xf
push 0xfffffffffffffff5
call ebx
push eax
call esi
cmp byte [ebp - 1], 0
jne 0x10005021
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8