I suppose that when you write that the data are in ascii it means you get it in a string value. so from you must divide it and then convert it to his hex value. Is that it ?
so from :
char toExtract[]="40863284";
int convertedValues[4];
for (int i=0; i<8; i+=2)
{
convertedValues[i/2] = (toExtract[i]-'0')*16 + (toExtract[i+1]-'0');
}
Now you get 4 values that correspond to the hexadecimal value. There is a lot of way about doing that, this is an version.
Exemple for '32' :
convert '3' to int : '3'-'0' gives the number 3, then by 16 gives 48. We add '2'-'0' that gives the number 2, which added to 48 gives 50.
and we've the good value because 0x32 = 50 !