Oh, this is excruciatingly painful... I am going to stick my glowing red hot prodder in here, to start herding you back into the corral here proneil.
This line is important too proneil. It's the crux of the function:
return sha1(randFromFileArray($descriptives)
. randFromFileArray($objects) . mt_rand(10, 99));
It returns one random descriptive concatenated to one random object concatenated to one random number between 10 and 99 encrypted using the sha1 encryption algorithm.
OK, so to get the PW, you need to first generate the word without the sha1 encryption and return it. Once you have returned it and defined the variable, you can then use the sha1 to encrypt it.
No code, but hopefully, I have given you enough information to figure it out.
(Sorry laserlight)