Function at 0x140019654
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 0x140019b7f
mov r14, qword [sym.imp.msvcrt.dll__strdup]
call r14
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140019b7f
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x30]
mov r8d, 0x5c
mov edx, 0x2f
mov rdi, rax
call fcn.140019645
mov rax, qword [0x1400b47f0]
cmp dword [rax], 3
je 0x1400196c6
xor esi, esi
jmp 0x140019847
cmp word [0x1400ff39c], 0
jne 0x1400196e2
mov eax, 0xffff
shl rax, 0x18
and rax, qword [0x1400ff388]
je 0x1400196bf
cmp word [0x1400ff384], 0
jne 0x1400196bf
cmp byte [0x1400ff392], 0
jne 0x1400196bf
mov ax, word [0x1400ff37a]
mov edx, eax
not edx
and dl, 7
je 0x1400196bf
mov edx, eax
not edx
test dl, 0x23
je 0x1400196bf
mov eax, edx
test ax, 0x1c0
je 0x1400196bf
mov al, byte [0x1400ff020]
or al, byte [0x1400ff38e]
jne 0x1400196bf
mov rax, qword [0x1400b4df0]
cmp qword [rax], 0
je 0x1400196bf
cmp byte [rbx + 3], 0
jne 0x140019749
cmp byte [rbx + 4], 0
jne 0x140019752
cmp byte [rbx + 2], 0
je 0x1400196bf
jmp 0x140019752
lea rdx, str.linux
jmp 0x140019759
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.140023e8c
test rax, rax
je 0x1400197c5
lea rcx, str.__Added_persistent_kernel_option
call fcn.1400380b9
cmp byte [rbx + 3], 0
je 0x140019800
mov dword [rsp + 0x20], 1
mov rcx, qword [rsp + 0x30]
lea r9, [0x14008e5db]
lea r8, str.maybe_ubiquity
lea rdx, str.linux
call fcn.140023e8c
lea rcx, str.__Removed_maybe_ubiquity_kernel_option
test rax, rax
jne 0x1400197fb
jmp 0x140019800
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.140023e8c
test rax, rax
je 0x140019807
lea rcx, str.__Added_persistent_kernel_option
call fcn.1400380b9
mov esi, 1
jmp 0x140019847
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.140023e8c
lea rcx, str.__Added_persistence_kernel_option
test rax, rax
jne 0x1400197fb
jmp 0x1400196bf
cmp byte [rbx], 0
jne 0x140019856
cmp byte [rbx + 1], 0
je 0x1400199d0
lea r8, str.x20
mov edx, 0x20
lea rcx, [0x1400fee20]
call fcn.1400243a7
lea r8, str.x20
mov edx, 0x20
lea rcx, [0x1400feee0]
mov qword [rsp + 0x38], rax
call fcn.1400243a7
cmp qword [rsp + 0x38], 0
mov qword [rsp + 0x40], rax
je 0x1400199bc
test rax, rax
je 0x1400199bc
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.140023e8c
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 0x1400198b6
test r11d, r11d
je 0x140019924
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.1400380b9
cmp byte [0x1400ff379], 0
je 0x1400199bc
mov rax, qword [0x1400b4c50]
lea rdx, str.netinst
mov rcx, qword [rax]
call sub.msvcrt.dll_strstr
test rax, rax
jne 0x1400199bc
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.140023e8c
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 0x14001995d
test r10d, r10d
je 0x1400199bc
mov rdx, qword [rsp + 0x30]
lea rcx, str.__Patched__s:__s___s_n
call fcn.1400380b9
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 0x140019a7f
mov rdx, qword [str._efi_boot]
test rdx, rdx
jne 0x1400199ed
lea rdx, [0x14008e3c0]
test r12, r12
jne 0x1400199f9
lea r12, [0x14008e3c0]
mov rcx, r12
mov r12, qword [sym.imp.msvcrt.dll__stricmp]
call r12
test eax, eax
jne 0x140019a7f
test rbp, rbp
jne 0x140019a16
lea rbp, [0x14008e3c0]
lea rdx, str.isolinux.cfg
mov rcx, rbp
call r12
test eax, eax
jne 0x140019a7f
cmp byte [0x1400ff38a], 0
jne 0x140019a7f
mov rcx, qword [rsp + 0x30]
call r14
mov rbp, rax
test rax, rax
je 0x140019a7f
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.1400380b9
mov rcx, rbp
call sub.msvcrt.dll_free
cmp byte [rbx + 3], 0
je 0x140019b4a
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 0x140019b3a
test rax, rax
je 0x140019b3a
mov rbp, qword [sym.imp.msvcrt.dll__snprintf]
lea r9, [0x1400fee20]
mov edx, 0x104
mov rcx, rdi
lea r8, str.cd9660:_dev_iso9660__s
call rbp
lea r9, [0x1400feee0]
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, [0x14008e74c]
call fcn.140023e8c
test rax, rax
je 0x140019b3a
mov rdx, qword [rsp + 0x30]
mov r9, rbx
mov r8, rdi
mov esi, 1
lea rcx, str.__Patched__s:__s___s_n
call fcn.1400380b9
mov rcx, rdi
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
test esi, esi
je 0x140019b65
mov rdx, qword [rsp + 0x48]
mov r8d, 1
lea rcx, [0x1400ff610]
call fcn.140036956
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