W3g format

Hello. I am writing a program to analyze replays. When a unit selects an object, action 0x12 occurs
1 word - Ability Flags
1 dword - ItemID
1 dword - unknownA
1 dword - unknownB
1 dword - target position X coordinate
1 dword - target position Y coordinate
1 dword - objectID1
1 dword - objectID2
in my replay contains for example obj1 => 7721,obj2 => 7721 obj1 => 7714,obj2 => 7714
how to find the name of an object by objectID1,
what is it, a tree, a unit or something else?
how to find out the number of killed enemies?