Let's examine the macro definition:
#define REG_PORT_DIR0 (*(RwReg *)0x41000000uL)
If may be easier to understand if we split it in three parts:
#define REG_PORT_DIR0_ADDR 0x41000000uL
#define REG_PORT_DIR0_PTR ((RwReg *)REG_PORT_DIR0_ADDR)
#define REG_PORT_DIR0 (*REG_PORT_DIR0_PTR)
So, the key here is that the two asterisks have different meanings.
In C, expressions of form (type)value, or equivalently (type)(value), are casts. They convert the type of the value to type. Above, 0x41000000uL is value, and RwReg * is type, a pointer to RwReg.
The REG_PORT_DIR0 macro dereferences the RwReg pointer to 0x41000000uL. So, in the original macro, the first asterisk dereferences a pointer, whereas the second asterisk is part of a pointer type specification, as part of a cast from integer address to an RwReg pointer.
Most likely, somewhere in the header files you'll see a typedef similar to typedef volatile unsigned long RwReg; which means that
REG_PORT_DIR0 = 5;
is effectively the same as
*((volatile unsigned long *)0x41000000uL) = 5;
which is effectively the same as
((volatile unsigned long *)0x41000000uL)[0] = 5;
i.e, the part in parentheses defines a pointer to a volatile unsigned long, and that pointer is immediately dereferenced without being assigned to any variable; it is how you use "pointer literals" in C.