Code to reverse a HEX value and convert to Decimal

Is it only the 4-byte scenario that you need to deal with? The sketch you posted that some UIDs might be 7-byte values. Processing those as you describe would be a very different proposition.

For the 4-byte scenario, I think you just need to convert the 4 byte values into a 32-bit long by shifting and adding the bytes in the right order. A 'for' loop would be the natural way to do that.

    long result = 0;
    for (int i=3; i >= 0; i--) 
    {
        result = (result << 8) + uid[i];
    }

Then you can just print the value. You want it printed as a decimal number, and the print() method will do that by default if you don't specify the radix.