After finding the "Memory" debug window in Visual Studio, it was pretty simply to solve the bug. The functions is now looking like this and seems to work fine.
; ------------------------------------------------------------------------------
input_create proc
invoke crt_malloc, 256 ; Allocate 256 Bytes for the key array
mov g_keys, eax ; Store the key array pointer
invoke crt_memset, g_keys, 0, 256 ; Make sure no buttons are pressed
ret
input_create endp
; ------------------------------------------------------------------------------
input_is_key_pressed proc key:dword
mov eax, g_keys ; Get the key array address
add eax, key ; Offset to the correct position in the array
mov ah, [eax] ; Read the value on the position in the array
.if(ah)
mov eax, 1
.else
mov eax, 0
.endif
ret
input_is_key_pressed endp