private void disassembleFunctions() throws PdbException, CancelledException {

		AddressSet disassembleAddresses = gatherAddressesForDisassembly();

		Listing listing = program.getListing();
		DisassemblerContextImpl seedContext =
			new DisassemblerContextImpl(program.getProgramContext());
		AddressSet revisedSet = new AddressSet();
		long num = disassembleAddresses.getNumAddresses();
		monitor.initialize(num);
		monitor.setMessage("PDB: Determining disassembly context for " + num + " addresses...");
		for (Address address : disassembleAddresses.getAddresses(true)) {
			monitor.checkCancelled();
			address = PseudoDisassembler.setTargetContextForDisassembly(seedContext, address);
			Function myFunction = listing.getFunctionAt(address);
			// If no function or not a full function, add it to set for disassembly.
			if (myFunction == null || myFunction.getBody().getNumAddresses() <= 1) {
				revisedSet.add(address);
			}
			monitor.incrementProgress(1);
		}
		// Do disassembly and ensure functions are created appropriately.
		num = revisedSet.getNumAddresses();
		monitor.setMessage("PDB: Bulk disassembly at " + num + " addresses...");
		DisassembleCommand cmd = new DisassembleCommand(revisedSet, null, true);
		cmd.setSeedContext(seedContext);
		cmd.applyTo(program, monitor);
		monitor.initialize(num);
		monitor.setMessage("PDB: Disassembly fix-up for " + num + " addresses...");
		for (Address address : revisedSet.getAddresses(true)) {
			monitor.checkCancelled();
			Function function = listing.getFunctionAt(address);
			if (function != null) {
				CreateFunctionCmd.fixupFunctionBody(program, function, cancelOnlyWrappingMonitor);
			}
			monitor.incrementProgress(1);
		}
	}
Set the context for each function, disassemble them, and then do fix-ups
@throws PdbException upon issue gathering the data
Ghidra/Features/PDB/src/main/java/ghidra/app/util/pdb/pdbapplicator/DefaultPdbApplicator.java