def METHOD_NAME(args):
    with tempfile.TemporaryDirectory() as d:
        print("Using temp directory {}".format(d))
        if args.exe:
            print("Extracting firmware exe")
            extract_exe(args.exe, d)
        print("Locating firmware bin")
        get_firmware_bin(d, args.bin, d)
        print("Creating metainfo")
        make_firmware_metainfo(args, d)
        print("Creating cabinet file")
        create_firmware_cab(args, d)
        print("Done")
        shutil.copy(os.path.join(d, "firmware.cab"), args.out)