Can i extract my current firmware from printer?

I need to pull my current firmware from my printer to edit in vs code because i managed to lose the drive i had the file stored on. Is this posssible? If so how?

You can’t extract the firmware and edit it. But you can grab all the settings you currently have with the M503 command.
Then, you need to recompile your firmware, and add the current settings to it.