> memcpy(data + 67, &yeetus, 5);
> memcpy(data + 68, &state, 4);
You have some very strange offsets and lengths.
First, let's assume that int's are 4 bytes on your machine, and that the endians of the peer machines is the same (see https://en.wikipedia.org/wiki/Endianness )
So,
1 - yeetus is only 4 bytes, but you copy 5
2 - you lose most of yeetus when you overwrite it with state
It looks like data is the data portion of a packet of some sort. Do you know the format of that packet? Without knowing what the format is supposed to be, it's hard to know how to fix the problems.