There is a GetProfileString or LoadProfileString or something similar...

its:

GetProfileString - to retrieve values from registry
WriteProfileString - to save values to registry