Function at 0x401010
Capabilities:
Log keystrokes via polling
Manipulate console buffer
Set console window title

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x75324
call fcn.00402670
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x75320], eax
push ebx
push esi
push edi
push str.ConsoleCraft_by_KjuFive__80x25
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
push 0x75300
lea eax, [esp + 0x2c]
push 0x20
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
add esp, 0xc
xor eax, eax
mov dword [esp + 0x14], 0x180000
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 0x180002
mov dword [esp + 0x1c], 0x180012
push 0x25
call ebx
test ax, ax
jns 0x401091
mov ecx, dword [0x405b08]
lea eax, [ecx - 1]
test eax, eax
cmovns ecx, eax
mov dword [0x405b08], ecx
push 0x27
call ebx
test ax, ax
jns 0x4010aa
mov eax, dword [0x405b08]
cmp eax, 0x4e
jge 0x4010aa
inc eax
mov dword [0x405b08], eax
push 0x28
call ebx
test ax, ax
jns 0x4010c3
mov eax, dword [0x405b0c]
cmp eax, 0x17
jge 0x4010c3
inc eax
mov dword [0x405b0c], eax
push 0x26
call ebx
test ax, ax
jns 0x4010db
mov eax, dword [0x405b0c]
test eax, eax
jle 0x4010db
dec eax
mov dword [0x405b0c], eax
push 0x57
call ebx
test ax, ax
jns 0x401107
imul eax, dword [0x405018], 0x320
mov ecx, dword [0x40539c]
add eax, ecx
cmp byte [esp + eax + 0x7a1a], 0x20
jne 0x401107
dec ecx
mov dword [0x40539c], ecx
push 0x41
call ebx
test ax, ax
jns 0x401133
mov ecx, dword [0x405018]
imul eax, ecx, 0x320
add eax, dword [0x40539c]
cmp byte [esp + eax + 0x76fb], 0x20
jne 0x401133
dec ecx
mov dword [0x405018], ecx
push 0x53
call ebx
test ax, ax
jns 0x40115f
imul eax, dword [0x405018], 0x320
mov ecx, dword [0x40539c]
add eax, ecx
cmp byte [esp + eax + 0x7a1c], 0x20
jne 0x40115f
inc ecx
mov dword [0x40539c], ecx
push 0x44
call ebx
test ax, ax
jns 0x40118b
mov ecx, dword [0x405018]
imul eax, ecx, 0x320
add eax, dword [0x40539c]
cmp byte [esp + eax + 0x7d3b], 0x20
jne 0x40118b
inc ecx
mov dword [0x405018], ecx
push 0x45
call ebx
test ax, ax
jns 0x4011e8
mov eax, dword [0x405398]
test eax, eax
jne 0x4011c1
mov eax, dword [0x405018]
add eax, dword [0x405b08]
imul eax, eax, 0x320
add eax, dword [0x40539c]
add eax, dword [0x405b0c]
mov byte [esp + eax + 0x28], 0xb1
jmp 0x4011e8
cmp eax, 1
jne 0x4011e8
mov eax, dword [0x405018]
add eax, dword [0x405b08]
imul eax, eax, 0x320
add eax, dword [0x40539c]
add eax, dword [0x405b0c]
mov byte [esp + eax + 0x28], 0xdb
push 0x51
call ebx
test ax, ax
jns 0x401213
mov eax, dword [0x405018]
add eax, dword [0x405b08]
imul eax, eax, 0x320
add eax, dword [0x40539c]
add eax, dword [0x405b0c]
mov byte [esp + eax + 0x28], 0x20
push 0x74
call ebx
test ax, ax
jns 0x401230
push 0x75300
lea eax, [esp + 0x2c]
push 0x20
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x31
call ebx
test ax, ax
jns 0x401245
mov dword [0x405398], 0
jmp 0x401260
push 0x32
call ebx
mov ecx, dword [0x405398]
test ax, ax
mov eax, 1
cmovs ecx, eax
mov dword [0x405398], ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
lea eax, [esp + 0x20]
mov dword [esp + 0x24], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
imul eax, dword [0x405018], 0x320
xor edi, edi
add eax, dword [0x40539c]
lea eax, [esp + eax + 0x28]
mov dword [esp + 0xc], eax
nop dword [eax]
nop dword [eax + eax]
lea ecx, [edi + 0x4053a0]
mov edx, eax
mov ebx, 0x4f
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 0x320]
mov byte [ecx], al
lea ecx, [ecx + 0x18]
sub ebx, 1
jne 0x4012c0
mov eax, dword [esp + 0xc]
inc edi
inc eax
mov dword [esp + 0xc], eax
cmp edi, 0x18
jl 0x4012b0
mov eax, dword [0x405b08]
mov edi, dword [esp + 0x10]
push edi
mov byte [0x40575b], 1
lea ecx, [eax + eax*2]
mov eax, dword [0x405b0c]
push 0xfffffffffffffff5
mov byte [eax + ecx*8 + 0x4053a0], 0x2b
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
xor eax, eax
mov dword [esp + 0xc], eax
nop word [eax + eax]
lea ebx, [eax + 0x4053a0]
mov esi, 0x4f
nop dword [eax + eax]
mov dl, byte [ebx]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00401420
lea ebx, [ebx + 0x18]
sub esi, 1
jne 0x401330
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dl, 0xb3
call fcn.00401420
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x401640
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, 0x18
jl 0x401320
mov esi, dword [esp + 0x14]
push esi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov ebx, 0x4f
nop word [eax + eax]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dl, 0xc4
call fcn.00401420
sub ebx, 1
jne 0x401390
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov dl, 0xd9
call fcn.00401420
push dword [esp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.ConsoleCraft
call fcn.00401670
push dword [esp + 0x1c]
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.WASD_Player__Arrows_Cursor__Q_E_put_clear_block__1_2_blocks
call fcn.00401670
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
push 0x1b
call ebx
test ax, ax
jns 0x401074
mov ecx, dword [esp + 0x7532c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004019b2
mov esp, ebp
pop ebp
ret