Package and VCC, GND suggest some kind of 8051 but clock connection is different - This need more information about device anc connections is this device really need DIP40 or use only few connection from it, communication ports, power design and voltage etc. etc.
This is not a mistake which you wrote this are 38 & 39 pins for oscilator not 18 & 19 - if is 18&19 then this perfectly match AVR.
B.R.