Function at 0x140059130
Capabilities:
Create thread
Manipulate boot configuration

Disassembly:
push rbp
push rbx
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x108]
sub rsp, 0x208
mov rax, qword [0x140106438]
xor rax, rsp
mov qword [rbp + 0xf0], rax
mov esi, ecx
xor r12d, r12d
lea rcx, str.Windows_To_Go_mode_selected
mov ebx, r12d
mov r14d, r8d
mov r15, rdx
call fcn.140041aa0
test r14d, r14d
je 0x14005919f
cmp dword [0x14015b558], 0xc
je 0x14005919f
cmp dword [0x1401429ec], 0x3a98
jae 0x14005919f
mov dword [0x140111620], 0xc0030032
xor eax, eax
jmp 0x14005969e
movzx ecx, byte [0x14015b40f]
mov qword [rsp + 0x200], rdi
test cl, cl
jne 0x140059241
mov rcx, qword [0x1401128d8]
xor edx, edx
call fcn.140055fb0
mov rdi, rax
test rax, rax
jne 0x1400591ea
lea rcx, str.Could_not_mount_ISO_for_Windows_To_Go_installation
call fcn.140041aa0
mov ecx, 0xe0031208
xor eax, eax
mov dword [0x140111620], ecx
jmp 0x140059696
movsxd rax, dword [0x140142ac8]
lea rcx, [0x14015b142]
shl rax, 6
lea r9, [0x1400e4578]
add rax, rcx
mov edx, 0x80
mov qword [rsp + 0x28], rax
lea rcx, [rbp + 0x70]
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x20], rdi
call fcn.1400034e0
mov rdx, rdi
mov byte [rbp + 0xef], bl
lea rcx, str.Mounted_ISO_as__s
call fcn.140041aa0
movzx ecx, byte [0x14015b40f]
test cl, cl
mov qword [rsp + 0x28], r12
lea rax, [rbp + 0x70]
mov dword [rsp + 0x40], r12d
cmovne rax, qword [0x1401128d8]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x50], rax
lea r8, [0x1400559f0]
mov eax, dword [0x140109f24]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], r12d
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140142ab0], rax
test rax, rax
jne 0x1400592a7
lea rcx, str.Unable_to_start_apply_image_thread
call fcn.140041aa0
jmp 0x1400592ef
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 + 0x40]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov ecx, dword [rsp + 0x40]
test eax, eax
mov qword [0x140142ab0], r12
cmove ecx, r12d
test ecx, ecx
jne 0x140059327
lea rcx, str.Failed_to_apply_Windows_To_Go_image
call fcn.140041aa0
mov eax, dword [0x140111620]
mov ecx, 0xe0031208
bt eax, 0x1f
cmovae eax, ecx
cmp byte [0x14015b40f], bl
mov dword [0x140111620], eax
jne 0x140059320
call fcn.140056400
xor eax, eax
jmp 0x140059696
cmp byte [0x14015b40f], bl
jne 0x140059334
call fcn.140056400
test r14d, r14d
je 0x14005941d
lea rcx, str.Setting_up_EFI_System_Partition
call fcn.140041aa0
mov eax, dword [0x14015b550]
mov r8d, 0x400
cmp eax, r8d
jbe 0x140059368
mov ecx, 0x1000
mov r8d, eax
cmp eax, ecx
cmovbe r8d, ecx
movsxd rax, dword [0x14015b534]
lea rbx, [0x14015b540]
imul rcx, rax, 0x58
lea eax, [rsi - 0x80]
cmp eax, 0x80
ja 0x140059400
test r8d, r8d
je 0x140059392
lea eax, [r8 - 1]
test r8d, eax
jne 0x140059400
mov rdx, qword [rcx + rbx + 0x70]
lea rax, [0x1400d756a]
mov r9, qword [0x1400d1668]
mov ecx, esi
mov dword [rsp + 0x28], 0x30003
mov qword [rsp + 0x20], rax
mov dword [0x14014303c], 1
call fcn.140011e20
test eax, eax
je 0x14005940a
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
movsxd rax, dword [0x14015b534]
mov ecx, esi
imul rdx, rax, 0x58
mov rdx, qword [rdx + rbx + 0x70]
call fcn.140007f10
mov rbx, rax
test rax, rax
jne 0x14005941d
mov dword [0x140111620], 0xe003120b
jmp 0x140059696
mov dword [0x140111620], 0xc0030057
lea rcx, str.Could_not_format_EFI_System_Partition
call fcn.140041aa0
xor eax, eax
jmp 0x140059696
lea rcx, str.Enabling_boot_using_command:
call fcn.140041aa0
cmp byte [0x14015b41c], r12b
je 0x14005944d
cmp byte [0x14015b41d], r12b
lea rcx, [0x1400f4720]
lea rax, str.BIOS
cmovne rax, rcx
jmp 0x140059454
lea rax, str.UEFI
test r14d, r14d
lea rsi, [0x14015a0e0]
mov rdi, r15
lea r9, str._s_bcdboot.exe__sWindows__v__f__s__s__s
cmovne rdi, rbx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], rdi
mov edx, 0x104
mov qword [rsp + 0x30], rax
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rsi
call fcn.1400034e0
mov edx, 0x25
mov byte [rbp + 0x63], r12b
lea rcx, [rsp + 0x60]
call fcn.140093068
test rax, rax
je 0x1400594c7
mov r8d, 0x2cd
lea rdx, str.C:_src_r3dusb_srcwue.c
lea rcx, str.strchr_cmd______NULL
call fcn.1400a15c4
lea rcx, [rsp + 0x60]
call fcn.140041aa0
mov r8d, dword [0x14015a340]
lea rcx, [rsp + 0x60]
xor r9d, r9d
mov rdx, rsi
call fcn.1400404c0
test eax, eax
je 0x140059503
lea rcx, str.Failed_to_enable_boot
call fcn.140041aa0
mov ecx, 0xe0031208
mov dword [0x140111620], ecx
mov rcx, rdi
call fcn.140058440
mov ecx, dword [0x140158ba0]
mov edx, 0xcc3
mov eax, dword [0x140158ba4]
mov r9d, dword [0x140158ba8]
mov dword [rsp + 0x20], r12d
lea r8d, [rcx + rax*2]
mov ecx, 7
call fcn.1400527d0
test byte [0x140142abc], 0x10
je 0x14005959d
lea rcx, str.Setting_the_targets_internal_drives_offline_using_command:
call fcn.140041aa0
mov rax, qword [0x140142ac0]
lea r9, str.dism__Image:_s__Apply_Unattend:_s
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x60]
mov edx, 0x104
mov qword [rsp + 0x20], r15
mov r8, 0xffffffffffffffff
call fcn.1400034e0
lea rcx, [rsp + 0x60]
mov byte [rbp + 0x63], r12b
call fcn.140041aa0
mov r8d, dword [0x14015a340]
lea rcx, [rsp + 0x60]
xor r9d, r9d
xor edx, edx
call fcn.1400404c0
lea rcx, str.Disabling_use_of_the_Windows_Recovery_Environment_using_command:
call fcn.140041aa0
lea r9, str._s_bcdedit.exe__store__sEFIMicrosoftBootBCD__set_default_recoveryenabled_no
mov qword [rsp + 0x28], rdi
mov edx, 0x104
mov qword [rsp + 0x20], rsi
mov r8, 0xffffffffffffffff
lea rcx, [rsp + 0x60]
call fcn.1400034e0
mov edx, 0x25
mov byte [rbp + 0x63], r12b
lea rcx, [rsp + 0x60]
call fcn.140093068
test rax, rax
je 0x140059601
mov r8d, 0x2e9
lea rdx, str.C:_src_r3dusb_srcwue.c
lea rcx, str.strchr_cmd______NULL
call fcn.1400a15c4
lea rcx, [rsp + 0x60]
call fcn.140041aa0
mov r8d, dword [0x14015a340]
lea rcx, [rsp + 0x60]
xor r9d, r9d
mov rdx, rsi
call fcn.1400404c0
mov r8d, dword [0x140158ba8]
mov edx, 0xcc3
mov r9d, r8d
mov dword [rsp + 0x20], r12d
mov ecx, 7
call fcn.1400527d0
test r14d, r14d
je 0x140059691
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
test rbx, rbx
je 0x140059691
xor r8d, r8d
mov rdx, rbx
lea ecx, [r8 + 0xa]
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
test eax, eax
jne 0x140059682
call fcn.140041e50
mov r8, rax
lea rcx, str.Could_not_unmount__s:__s
mov rdx, rbx
call fcn.140041aa0
jmp 0x140059691
mov rdx, rbx
lea rcx, str.Successfully_unmounted__s
call fcn.140041aa0
mov eax, 1
mov rdi, qword [rsp + 0x200]
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.140092060
add rsp, 0x208
pop r15
pop r14
pop r12
pop rsi
pop rbx
pop rbp
ret