Function at 0x1400596c0
Capabilities:
Check if file exists
Copy file
Create directory
Create thread
Move file
Set registry value

Disassembly:
mov r11, rsp
push rbp
push rdi
push r15
lea rbp, [r11 - 0x1b8]
sub rsp, 0x2a0
mov rax, qword [0x140106438]
xor rax, rsp
mov qword [rbp + 0x180], rax
movups xmm0, xmmword [str._:_sources_boot.wim]
mov eax, dword [0x1400f48f0]
movsd xmm1, qword [0x1400f4908]
movups xmmword [rbp - 0x28], xmm0
mov qword [r11 + 0x20], r12
mov r12d, edx
movups xmm0, xmmword [str._:_sources_appraiserres.dll]
mov dword [rbp - 0x18], eax
mov eax, dword [0x1400f4910]
movups xmmword [rbp - 0x10], xmm0
mov qword [r11 - 0x20], r13
movups xmm0, xmmword [str._:_sources_appraiserres.bak]
movsx r13d, cl
xor ecx, ecx
cmp qword [0x140142ac0], rcx
mov edi, ecx
movsd qword [rbp], xmm1
mov r15d, ecx
movsd xmm1, qword [0x1400f4928]
mov dword [rbp + 8], eax
mov eax, dword [0x1400f4930]
movups xmmword [rbp + 0x10], xmm0
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x50], 2
movsd qword [rbp + 0x20], xmm1
mov dword [rbp + 0x28], eax
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], rcx
mov dword [rsp + 0x68], 1
jne 0x140059796
mov r8d, 0x30b
lea rdx, str.C:_src_r3dusb_srcwue.c
lea rcx, str.unattend_xml_path___NULL
call fcn.1400a15c4
mov qword [rsp + 0x2c8], rbx
lea rcx, str.Applying_Windows_customization:
mov qword [rsp + 0x2d0], rsi
mov qword [rsp + 0x290], r14
call fcn.140041aa0
mov r9d, 0xcfe
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.14001b7e0
bt r12d, 0x10
jae 0x1400598a0
mov ebx, r13d
lea r9, str._c:WindowsPanther
mov edx, 0x104
mov dword [rsp + 0x20], ebx
mov r8, 0xffffffffffffffff
lea rcx, [rbp + 0x30]
call fcn.1400034e0
xor edx, edx
mov byte [rbp + 0x133], dil
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140059840
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140059840
call fcn.140041e50
mov r8, rax
lea rdx, [rbp + 0x30]
lea rcx, str.Could_not_create__s_:__s
call fcn.140041aa0
mov ebx, 2
jmp 0x140059edb
lea r9, str._c:WindowsPantherunattend.xml
mov dword [rsp + 0x20], ebx
mov edx, 0x104
lea rcx, [rbp + 0x30]
mov r8, 0xffffffffffffffff
call fcn.1400034e0
mov rcx, qword [0x140142ac0]
lea rdx, [rbp + 0x30]
mov r8d, 1
mov byte [rbp + 0x133], dil
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x14005981e
lea rdx, [rbp + 0x30]
lea rcx, str.Added__s
call fcn.140041aa0
mov ebx, dword [rsp + 0x50]
mov edi, 1
jmp 0x140059edb
mov esi, r12d
mov byte [rbp - 0x28], r13b
and esi, 1
je 0x140059ac6
lea rcx, [rbp - 0x10]
mov byte [rbp - 0x10], r13b
mov byte [rbp + 0x10], r13b
call fcn.140003550
lea rcx, [rbp + 0x10]
mov rbx, rax
call fcn.140003550
mov r8d, 1
mov rdx, rax
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov r14d, eax
test rdi, rdi
je 0x1400598f2
mov rcx, rdi
call fcn.14009b5a0
test rbx, rbx
je 0x1400598ff
mov rcx, rbx
call fcn.14009b5a0
test r14d, r14d
jne 0x14005992c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14005992c
call fcn.140041e50
mov r8, rax
lea rdx, [rbp - 0x10]
lea rcx, str.Could_not_rename__s:__s
call fcn.140041aa0
jmp 0x140059a61
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14005994a
lea r8, [rbp + 0x10]
lea rdx, [rbp - 0x10]
lea rcx, str.Renamed__s___s
call fcn.140041aa0
lea rcx, [rbp - 0x10]
call fcn.140003550
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov rcx, rax
mov dword [rsp + 0x20], 2
mov rbx, rax
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rbx, rbx
je 0x140059999
mov rcx, rbx
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp - 0x10]
lea rcx, str.Created__s_placeholder
call fcn.140041aa0
cmp dword [0x1401429c0], r15d
je 0x140059ac6
xorps xmm0, xmm0
lea rcx, [rbp + 0x10]
xor eax, eax
movups xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x30], rax
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call fcn.140003550
lea rdx, [rbp - 0x60]
mov rcx, rax
mov rbx, rax
call fcn.1400a5624
test rbx, rbx
je 0x140059a02
mov rcx, rbx
call fcn.14009b5a0
mov rax, qword [rbp - 0x48]
sub qword [0x140159be8], rax
mov rbx, qword [0x1401429c8]
test rbx, rbx
je 0x140059ac6
mov eax, dword [0x1401429d4]
cmp dword [0x1401429d0], eax
jne 0x140059a82
add eax, eax
mov rcx, rbx
mov edx, eax
shl rdx, 3
mov dword [0x1401429d4], eax
call fcn.140096c28
mov qword [0x1401429c8], rax
test rax, rax
jne 0x140059a82
mov rcx, rbx
call fcn.14009b5a0
lea rcx, str.Could_not_reallocate_string_array
call fcn.140041aa0
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov r9d, 0xcf
mov edx, 0xcfd
lea ecx, [r8 + 8]
call fcn.1400527d0
jmp 0x140059aed
lea rcx, [rbp - 0x10]
call fcn.1400a1b50
mov ecx, dword [0x1401429d0]
mov rdx, rax
mov rax, qword [0x1401429c8]
mov qword [rax + rcx*8], rdx
mov ecx, dword [0x1401429d0]
mov rax, qword [0x1401429c8]
cmp qword [rax + rcx*8], r15
jne 0x140059abb
lea rcx, str.Could_not_store_string_in_array
jmp 0x140059a5c
lea eax, [rcx + 1]
mov dword [0x1401429d0], eax
jmp 0x140059a61
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov r9d, 0xcf
mov edx, 0xcfd
lea ecx, [r8 + 8]
call fcn.1400527d0
test esi, esi
je 0x140059f7e
cmp dword [0x1401429c0], r15d
je 0x140059b3b
xorps xmm0, xmm0
lea rcx, [rbp - 0x28]
xor eax, eax
movups xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x30], rax
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call fcn.140003550
lea rdx, [rbp - 0x60]
mov rcx, rax
mov rbx, rax
call fcn.1400a5624
test rbx, rbx
je 0x140059b30
mov rcx, rbx
call fcn.14009b5a0
mov rax, qword [rbp - 0x48]
sub qword [0x140159be8], rax
mov ebx, 2
lea rdx, [rbp - 0x28]
mov r8d, ebx
lea rcx, str.Mounting__s__d_...
call fcn.140041aa0
lea rcx, [rbp - 0x28]
call fcn.140055520
test eax, eax
jne 0x140059b8d
lea rcx, str.WARNING:_This_image_appears_to_be_an_UNOFFICIAL_Windows_ISO_
call fcn.140041aa0
lea rcx, str.Rufus_recommends_that_you_only_use_OFFICIAL_retail_Microsoft_Windows_images__such_as
call fcn.140041aa0
lea rcx, str.the_ones_that_can_be_downloaded_through_the_download_facility_of_this_application.
call fcn.140041aa0
mov ebx, 1
mov dword [rsp + 0x50], ebx
mov edx, ebx
lea rcx, [rbp - 0x28]
call fcn.1400544a0
mov r15, rax
test rax, rax
je 0x140059ed7
lea r9, str._sWindowsSystem32configSYSTEM
mov qword [rsp + 0x20], rax
mov edx, 0x104
lea rcx, [rbp + 0x30]
mov r8, 0xffffffffffffffff
call fcn.1400034e0
mov byte [rbp + 0x133], 0
mov qword [rsp + 0x60], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140059c17
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_get_current_process_token:__s
call fcn.140041aa0
lea rcx, str.Falling_back_to_creating_the_registry_keys_through_unattend.xml
call fcn.140041aa0
jmp 0x140059f7e
mov rcx, qword [rsp + 0x60]
lea rdx, str.SeRestorePrivilege
call fcn.140041840
mov rcx, qword [rsp + 0x60]
lea rdx, str.SeBackupPrivilege
call fcn.140041840
lea rdi, str.RUFUS_OFFLINE_HIVE
mov rcx, 0xffffffff80000002
mov rdx, rdi
lea r8, [rbp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
mov ebx, eax
test eax, eax
je 0x140059c7c
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
mov r8, rax
lea rdx, [rbp + 0x30]
lea rcx, str.Could_not_mount_offline_registry_hive__s:__s
call fcn.140041aa0
jmp 0x140059c96
mov r9, rdi
lea r8, str.HKLM
lea rdx, [rbp + 0x30]
lea rcx, str.Mounted_offline_registry_hive__s_to__s_s
call fcn.140041aa0
mov rcx, qword [rsp + 0x60]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140059cab
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140059cc0
lea rcx, str.Falling_back_to_creating_the_registry_keys_through_unattend.xml
call fcn.140041aa0
jmp 0x140059f7e
mov ecx, 8
mov dword [rsp + 0x20], 1
mov edx, 0xcfd
mov r9d, 0xcf
lea r8d, [rcx + 0x5d]
call fcn.1400527d0
mov edx, 0x40
mov dword [rsp + 0x58], 1
lea r9, str._sSetup
mov qword [rsp + 0x20], rdi
lea rcx, [rbp + 0x140]
lea r8, [rdx - 0x41]
call fcn.1400034e0
lea rax, [rsp + 0x78]
mov byte [rbp + 0x17f], 0
mov r9d, 0x2001d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x140]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x140059d5d
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_open_HKLMSYSTEMSetup_registry_key:__s
call fcn.140041aa0
jmp 0x140059f7e
mov rcx, qword [rsp + 0x78]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
lea rdx, str.LabConfig
lea rax, [rsp + 0x70]
xor esi, esi
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], 7
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x140059dc0
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_create_HKLMSYSTEMSetupLabConfig_registry_key:__s
call fcn.140041aa0
jmp 0x140059f7e
lea r14, str.BypassTPMCheck
mov edi, esi
mov rbx, r14
nop dword [rax]
mov rdx, qword [rbx]
lea rax, [rsp + 0x68]
mov rcx, qword [rsp + 0x70]
mov r9d, 4
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x140059f5b
mov rdx, qword [rbx]
lea rcx, str.Created_HKLMSYSTEMSetupLabConfig_s_registry_key
call fcn.140041aa0
inc edi
add rbx, 8
cmp edi, 3
jb 0x140059dd0
mov rcx, qword [0x140142ac0]
lea r9, str.disabled
lea r8, str.windowsPE
mov dword [rsp + 0x20], esi
lea rdx, str._settings
call fcn.140021f30
test rax, rax
jne 0x140059e51
lea rcx, str.Warning:_Could_not_disable_windowsPE_pass_from_unattend.xml
call fcn.140041aa0
mov ecx, 8
mov dword [rsp + 0x20], 1
mov edx, 0xcfd
mov r9d, 0xcf
lea r8d, [rcx + 0x5e]
call fcn.1400527d0
mov ebx, r13d
lea r9, str._c:_sources_OEM___Panther
mov edx, 0x104
mov dword [rsp + 0x20], ebx
mov r8, 0xffffffffffffffff
lea rcx, [rbp + 0x30]
call fcn.1400034e0
xor r8d, r8d
mov byte [rbp + 0x133], 0
lea rdx, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
test eax, eax
je 0x14005a056
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
mov r8, rax
lea rdx, [rbp + 0x30]
lea rcx, str.Error:_Could_not_create_directory__s:__s
call fcn.140041aa0
mov ebx, dword [rsp + 0x50]
mov edi, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x70]
mov r14, qword [rsp + 0x290]
mov r13, qword [rsp + 0x298]
mov r12, qword [rsp + 0x2d8]
test rcx, rcx
je 0x140059f03
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140059f13
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x58], 0
je 0x14005a16e
lea rdx, str.RUFUS_OFFLINE_HIVE
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyA]
test eax, eax
je 0x14005a133
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_unmount_offline_registry_hive:__s
call fcn.140041aa0
jmp 0x14005a14d
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140041e50
movsxd rdx, edi
lea rcx, str.Could_not_set_HKLMSYSTEMSetupLabConfig_s_registry_key:__s
mov r8, rax
mov rdx, qword [r14 + rdx*8]
call fcn.140041aa0
test r12b, 1
je 0x140059e72
test r15, r15
jne 0x140059fa6
mov r8d, 0x37f
lea rdx, str.C:_src_r3dusb_srcwue.c
lea rcx, str.mount_path___NULL
call fcn.1400a15c4
lea r9, str._sAutounattend.xml
mov qword [rsp + 0x20], r15
mov edx, 0x104
lea rcx, [rbp + 0x30]
mov r8, 0xffffffffffffffff
call fcn.1400034e0
mov rcx, qword [0x140142ac0]
mov byte [rbp + 0x133], 0
call fcn.140003550
lea rcx, [rbp + 0x30]
mov rdi, rax
call fcn.140003550
mov r8d, 1
mov rdx, rax
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rdi, rdi
je 0x14005a013
mov rcx, rdi
call fcn.14009b5a0
test rbx, rbx
je 0x14005a020
mov rcx, rbx
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x14005a046
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_create_boot.wim_Autounattend.xml:__s
call fcn.140041aa0
jmp 0x140059ed3
lea rcx, str.Added_Autounattend.xml_to__s
lea rdx, [rbp - 0x28]
jmp 0x14005a0ff
lea r9, str._c:_sources_OEM___Pantherunattend.xml
mov dword [rsp + 0x20], ebx
mov edx, 0x104
lea rcx, [rbp + 0x30]
mov r8, 0xffffffffffffffff
call fcn.1400034e0
mov rcx, qword [0x140142ac0]
mov byte [rbp + 0x133], 0
call fcn.140003550
lea rcx, [rbp + 0x30]
mov rdi, rax
call fcn.140003550
mov r8d, 1
mov rdx, rax
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rdi, rdi
je 0x14005a0c2
mov rcx, rdi
call fcn.14009b5a0
test rbx, rbx
je 0x14005a0cf
mov rcx, rbx
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x14005a0f4
call fcn.140041e50
mov r8, rax
lea rdx, [rbp + 0x30]
lea rcx, str.Could_not_create__s:__s
jmp 0x140059ece
lea rcx, str.Created__s
lea rdx, [rbp + 0x30]
call fcn.140041aa0
mov ecx, 8
mov dword [rsp + 0x20], 1
mov edx, 0xcfd
mov r9d, 0xcf
lea r8d, [rcx + 0x5f]
call fcn.1400527d0
mov ebx, dword [rsp + 0x50]
mov edi, 1
jmp 0x140059edb
lea r8, str.RUFUS_OFFLINE_HIVE
lea rdx, str.HKLM
lea rcx, str.Unmounted_offline_registry_hive__s_s
call fcn.140041aa0
mov ecx, 8
mov dword [rsp + 0x20], 1
mov edx, 0xcfd
mov r9d, 0xcf
lea r8d, [rcx + 0x60]
call fcn.1400527d0
test r15, r15
je 0x14005a324
mov r8d, ebx
lea rdx, [rbp - 0x28]
lea rcx, str.Unmounting__s__d_...
call fcn.140041aa0
xor esi, esi
mov dword [rbp - 0x78], ebx
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rsi
lea r9, [rbp - 0x78]
mov qword [rbp - 0x70], rax
lea r8, [0x140054700]
mov dword [rsp + 0x20], esi
xor edx, edx
mov dword [rsp + 0x58], esi
xor ecx, ecx
mov qword [rbp - 0x68], rsi
mov dword [rbp - 0x74], 1
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140142ab0], rax
test rax, rax
jne 0x14005a1de
lea rcx, str.Unable_to_start_unmount_image_thread
call fcn.140041aa0
jmp 0x14005a218
mov edx, dword [0x14010719c]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [0x140142ab0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x140142ab0]
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov qword [0x140142ab0], rsi
cmp dword [0x1401429c0], esi
je 0x14005a308
xorps xmm0, xmm0
lea rcx, [rbp - 0x28]
xor eax, eax
movups xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x30], rax
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call fcn.140003550
lea rdx, [rbp - 0x60]
mov rcx, rax
mov rbx, rax
call fcn.1400a5624
test rbx, rbx
je 0x14005a25e
mov rcx, rbx
call fcn.14009b5a0
mov rax, qword [rbp - 0x48]
add qword [0x140159be8], rax
mov rbx, qword [0x1401429c8]
test rbx, rbx
je 0x14005a308
mov eax, dword [0x1401429d4]
cmp dword [0x1401429d0], eax
jne 0x14005a2bf
add eax, eax
mov rcx, rbx
mov edx, eax
shl rdx, 3
mov dword [0x1401429d4], eax
call fcn.140096c28
mov qword [0x1401429c8], rax
test rax, rax
jne 0x14005a2bf
mov rcx, rbx
call fcn.14009b5a0
lea rcx, str.Could_not_reallocate_string_array
call fcn.140041aa0
jmp 0x14005a308
lea rcx, [rbp - 0x28]
call fcn.1400a1b50
mov edx, dword [0x1401429d0]
mov r8, rax
mov rax, qword [0x1401429c8]
mov qword [rax + rdx*8], r8
mov edx, dword [0x1401429d0]
mov rax, qword [0x1401429c8]
cmp qword [rax + rdx*8], rsi
jne 0x14005a2fd
lea rcx, str.Could_not_store_string_in_array
call fcn.140041aa0
jmp 0x14005a308
lea r9d, [rdx + 1]
mov dword [0x1401429d0], r9d
mov r9d, 0xcf
mov dword [rsp + 0x20], esi
mov r8d, r9d
mov edx, 0xcfd
mov ecx, 8
call fcn.1400527d0
mov rcx, r15
call fcn.14009b5a0
mov rsi, qword [rsp + 0x2d0]
mov eax, edi
mov rbx, qword [rsp + 0x2c8]
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.140092060
add rsp, 0x2a0
pop r15
pop rdi
pop rbp
ret