/Engine/Source/Editor/UnrealEd/Public/EditorCommandLineUtils.h
Generally, users supply the project path/name as the second argument of the editor command-line, but in some cases (like for the -diff command), we can infer the project from elements elsewhere in the command-line... This function serves as a fallback for determining the launching project path, and does special processing based off of commands that are found in the command-line.
True if the command-line contained enough info to pull a .uproject file from.
static bool ParseGameProjectPath ( const TCHAR * EditorCmdLine, [FString](API\Runtime\Core\Containers\FString) & ProjPathOut, [FString](API\Runtime\Core\Containers\FString) & GameNameOut )