Function at 0x14001915f
Capabilities:
Copy file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov qword [rsp + 0x48], rcx
mov r12, rdx
mov rbp, r8
mov rbx, r9
test rcx, rcx
je 0x14001966d
mov r14, qword [sym.imp.msvcrt.dll__strdup]
call r14
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14001966d
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x30]
mov r8d, 0x5c
mov edx, 0x2f
mov rdi, rax
call fcn.140019147
mov rax, qword [0x1400b1630]
cmp dword [rax], 3
je 0x1400191d1
xor esi, esi
jmp 0x140019341
mov eax, dword [0x1400fb22c]
or ax, word [0x1400fb21c]
je 0x1400191ca
cmp word [0x1400fb214], 0
jne 0x1400191ca
cmp byte [0x1400fb221], 0
jne 0x1400191ca
mov ax, word [0x1400fb20a]
mov edx, eax
not edx
and dl, 7
je 0x1400191ca
mov edx, eax
not edx
test dl, 0x23
je 0x1400191ca
mov eax, edx
test ax, 0x1c0
je 0x1400191ca
mov al, byte [0x1400fafe0]
or al, byte [0x1400fb21f]
jne 0x1400191ca
mov rax, qword [0x1400b1be0]
cmp qword [rax], 0
je 0x1400191ca
cmp byte [rbx + 3], 0
jne 0x140019243
cmp byte [rbx + 4], 0
jne 0x14001924c
cmp byte [rbx + 2], 0
je 0x1400191ca
jmp 0x14001924c
lea rdx, str.linux
jmp 0x140019253
lea rdx, str.append
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
lea r9, str.persistent_file_cdrom_preseed
lea r8, str.file_cdrom_preseed
call fcn.14002350c
test rax, rax
je 0x1400192bf
lea rcx, str.__Added_persistent_kernel_option
call fcn.140036717
cmp byte [rbx + 3], 0
je 0x1400192fa
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
lea r9, [0x1400884b1]
lea r8, str.maybe_ubiquity
lea rdx, str.linux
call fcn.14002350c
lea rcx, str.__Removed_maybe_ubiquity_kernel_option
test rax, rax
jne 0x1400192f5
jmp 0x1400192fa
mov dword [rsp + 0x20], 1
lea rsi, str.linux
mov rcx, qword [rsp + 0x30]
lea r9, str.persistent_layerfs_pathminimal.standard.live.squashfs
lea r8, str.layerfs_pathminimal.standard.live.squashfs
mov rdx, rsi
call fcn.14002350c
test rax, rax
je 0x140019301
lea rcx, str.__Added_persistent_kernel_option
call fcn.140036717
mov esi, 1
jmp 0x140019341
cmp byte [rbx + 3], 0
lea rdx, str.append
mov dword [rsp + 0x20], 1
lea r9, str.bootlive_persistence
mov rcx, qword [rsp + 0x30]
cmovne rdx, rsi
lea r8, str.bootlive
call fcn.14002350c
lea rcx, str.__Added_persistence_kernel_option
test rax, rax
jne 0x1400192f5
jmp 0x1400191ca
cmp byte [rbx], 0
jne 0x140019350
cmp byte [rbx + 1], 0
je 0x1400194ca
lea r8, str.x20
mov edx, 0x20
lea rcx, [0x1400fade0]
call fcn.140023a27
lea r8, str.x20
mov edx, 0x20
lea rcx, [0x1400faea0]
mov qword [rsp + 0x38], rax
call fcn.140023a27
cmp qword [rsp + 0x38], 0
mov qword [rsp + 0x40], rax
je 0x1400194b6
test rax, rax
je 0x1400194b6
lea r13, str.options
xor r11d, r11d
lea r15, [r13 + 0x30]
mov r10, r13
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
mov dword [rsp + 0x5c], r11d
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
mov rdx, qword [r10]
mov qword [rsp + 0x50], r10
call fcn.14002350c
mov r11d, dword [rsp + 0x5c]
mov r10, qword [rsp + 0x50]
mov rdx, rax
mov eax, 1
test rdx, rdx
cmovne r11d, eax
cmovne esi, eax
add r10, 8
cmp r10, r15
jne 0x1400193b0
test r11d, r11d
je 0x14001941e
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
lea rcx, str.__Patched__s:__s___s_n
mov rdx, qword [rsp + 0x30]
call fcn.140036717
cmp byte [0x1400fb209], 0
je 0x1400194b6
mov rax, qword [0x1400b1a70]
lea rdx, str.netinst
mov rcx, qword [rax]
call sub.msvcrt.dll_strstr
test rax, rax
jne 0x1400194b6
xor r10d, r10d
lea r9, str.inst.repo
lea r8, str.inst.stage2
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
mov rdx, qword [r13]
mov dword [rsp + 0x50], r10d
call fcn.14002350c
mov r10d, dword [rsp + 0x50]
lea r8, str.inst.stage2
lea r9, str.inst.repo
mov rdx, rax
mov eax, 1
test rdx, rdx
cmovne r10d, eax
cmovne esi, eax
add r13, 8
cmp r13, r15
jne 0x140019457
test r10d, r10d
je 0x1400194b6
mov rdx, qword [rsp + 0x30]
lea rcx, str.__Patched__s:__s___s_n
call fcn.140036717
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
cmp byte [rbx + 2], 0
je 0x14001956d
test r12, r12
jne 0x1400194e0
lea r12, [0x140088280]
mov rcx, r12
lea rdx, str._efi_boot
mov r12, qword [sym.imp.msvcrt.dll__stricmp]
call r12
test eax, eax
jne 0x14001956d
test rbp, rbp
jne 0x140019504
lea rbp, [0x140088280]
lea rdx, str.isolinux.cfg
mov rcx, rbp
call r12
test eax, eax
jne 0x14001956d
cmp byte [0x1400fb21a], 0
jne 0x14001956d
mov rcx, qword [rsp + 0x30]
call r14
mov rbp, rax
test rax, rax
je 0x14001956d
mov rcx, qword [rsp + 0x30]
mov r8d, 1
mov rdx, rax
mov byte [rax + rdi - 0xc], 0x73
mov byte [rax + rdi - 0xb], 0x79
mov byte [rax + rdi - 0xa], 0x73
call qword [sym.imp.KERNEL32.DLL_CopyFileA]
mov rdx, qword [rsp + 0x30]
lea rcx, str.Duplicated__s_to__s_n
mov r8, rbp
call fcn.140036717
mov rcx, rbp
call sub.msvcrt.dll_free
cmp byte [rbx + 3], 0
je 0x140019638
mov ecx, 0x104
call sub.msvcrt.dll_malloc
mov ecx, 0x104
mov rdi, rax
call sub.msvcrt.dll_malloc
mov rbx, rax
test rdi, rdi
je 0x140019628
test rax, rax
je 0x140019628
mov rbp, qword [sym.imp.msvcrt.dll__snprintf]
lea r9, [0x1400fade0]
mov edx, 0x104
mov rcx, rdi
lea r8, str.cd9660:_dev_iso9660__s
call rbp
lea r9, [0x1400faea0]
lea r8, str.msdosfs:_dev_msdosfs__s
mov rcx, rbx
mov edx, 0x104
mov byte [rdi + 0x103], 0
call rbp
mov byte [rbx + 0x103], 0
mov r9, rbx
mov r8, rdi
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
lea rdx, [0x140088622]
call fcn.14002350c
test rax, rax
je 0x140019628
mov rdx, qword [rsp + 0x30]
mov r9, rbx
mov r8, rdi
mov esi, 1
lea rcx, str.__Patched__s:__s___s_n
call fcn.140036717
mov rcx, rdi
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
test esi, esi
je 0x140019653
mov rdx, qword [rsp + 0x48]
mov r8d, 1
lea rcx, [0x1400fb4f0]
call fcn.14003527d
mov rcx, qword [rsp + 0x30]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_free
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret