First, you're using an older version than I am, which is why the "_" differences. When mame added multiple keyboard support, the underscore was removed from the 2_pad to remove confusion in mame that keycode_2_pad wasn't keyboard 2, with the "pad" (non-existant) key. Now a number between two underscores is the keyboard number. Use the format that works with your version; I one I supplied won't work with 0.117 for the p1 joystick because of the change.
Next, does mala have different settings than mameUI? If one of a few options are changed, such as inipath, ctrlrpath, ctrlr, or readconfig, or mala puts them on the call mame commandline, then settings will work differently. At least try coping mamefolder\ini\mame32.ini to mamefolder\mame.ini. (Hmm, or is mala not calling the same mameUI as you are running straight?)
Last, you copied & renamed mslug.cfg file, right? The system name in aof.cfg should be "aof" (on line four). If you want the cfg files to work, the same will need to be done to all cfg files, and that's assuming (very likely with neogeo games, actually) that all the games have the same mask, index, and defvalue. But if the ctrlr file was working, then you won't need the game specific cfg files anyway. (I'm going to claim I didn't notice it before cecause I only looked at mslug.cfg file, but I should have looked at or compared at least two of the cfg files.

)
Try this: remove the cfg files from the cfg folder, set ctrlr xarcade with your xarcade.cfg file, and try mameUI and see if the neogeo buttons are correct, then try mala. This removes confusion on what's working and what's not working. I think it's just mala sending mameUI a different setting, and the cfg file isn't working in either mameUI or mala.
If it's a mala config thing, then I can't really help much...
Probably this should be moved to the Mala forum 
It's at least partially mame cfg & ctrlr file stuff. This is the right place for that.