Function at 0x14006c920
Capabilities:
Copy file
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x100
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rbp + 0x27], rax
xor r12d, r12d
movsx edx, cl
movzx ecx, word [0x1401e8f52]
lea rax, str.i386
mov qword [rbp - 0x71], rax
mov r13d, r12d
lea rax, str.amd64
mov qword [rsp + 0x40], r12
mov qword [rbp - 0x69], rax
mov r15d, 0x1c0
lea rax, str.minint
mov qword [rbp - 0x61], rax
lea rax, str.i386_txtsetup.sif
mov qword [rbp - 0x59], rax
lea rax, str.i386_system32_
mov qword [rbp - 0x51], rax
lea rax, str._amd64_txtsetup.sif
mov qword [rbp - 0x49], rax
lea rax, str._amd64_system32_
mov qword [rbp - 0x41], rax
movzx eax, cl
and al, 0x23
cmp al, 0x23
jne 0x14006c9c6
mov r14d, 1
jmp 0x14006c9dd
movzx eax, r15w
mov r14d, r12d
and ax, cx
mov ecx, 2
cmp ax, r15w
cmove r14d, ecx
mov ecx, 0xfffffffe
mov qword [rsp + 0x138], rbx
mov eax, r14d
mov edi, edx
and rax, rcx
mov ecx, edx
mov rsi, qword [rbp + rax*8 - 0x71]
call fcn.1400fc5e0
lea r9, str._c:_s_ntdetect.com
mov qword [rsp + 0x28], rsi
mov edx, 0x40
mov dword [rsp + 0x20], eax
mov r8, 0xffffffffffffffff
lea rcx, [rbp - 0x19]
call fcn.140004fd0
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc5e0
lea r9, str._c:_ntdetect.com
mov dword [rsp + 0x20], eax
mov edx, 0x20
lea rcx, [rbp - 0x39]
mov r8, 0xffffffffffffffff
call fcn.140004fd0
mov r8d, 1
mov byte [rbp - 0x1a], r12b
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
cmp byte [0x1401e8f6b], r12b
jne 0x14006cb4c
mov eax, r14d
lea rbx, [rbp - 0x71]
mov ecx, edi
lea rbx, [rbx + rax*8]
call fcn.1400fc5e0
mov ecx, eax
lea r9, str._c:_s_txtsetup.sif
mov rax, qword [rbx]
mov edx, 0x40
mov qword [rsp + 0x28], rax
mov r8, 0xffffffffffffffff
mov dword [rsp + 0x20], ecx
lea rcx, [rbp - 0x19]
call fcn.140004fd0
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc5e0
lea r9, str._c:_txtsetup.sif
mov dword [rsp + 0x20], eax
mov edx, 0x20
lea rcx, [rbp - 0x39]
mov r8, 0xffffffffffffffff
call fcn.140004fd0
mov r8d, 1
mov byte [rbp - 0x1a], r12b
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14006cb12
call fcn.14004fba0
mov r9, rax
lea r8, [rbp - 0x39]
lea rdx, [rbp - 0x19]
lea rcx, str.Did_not_copy__s_as__s:__s_n
call fcn.14004f2f0
lea rcx, [rbp - 0x39]
call fcn.140027b70
test rax, rax
jne 0x14006cb35
lea rdx, [rbp - 0x39]
lea rcx, str.Failed_to_add_SetupSourceDevice_in__s_n
call fcn.14004f2f0
jmp 0x14006d046
lea r8, [rbp - 0x39]
lea rdx, str.SetupSourceDevice___deviceharddisk1partition1_
lea rcx, str.Successfully_added__s_to__s_n
call fcn.14004f2f0
mov ecx, edi
call fcn.1400fc5e0
lea r9, str._c:_s_setupldr.bin
mov qword [rsp + 0x28], rsi
mov edx, 0x40
mov dword [rsp + 0x20], eax
mov r8, 0xffffffffffffffff
lea rcx, [rbp - 0x19]
call fcn.140004fd0
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc5e0
lea r9, str._c:BOOTMGR
mov dword [rsp + 0x20], eax
mov edx, 0x20
lea rcx, [rbp - 0x39]
mov r8, 0xffffffffffffffff
call fcn.140004fd0
mov r8d, 1
mov byte [rbp - 0x1a], r12b
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14006cbdb
call fcn.14004fba0
mov r9, rax
lea r8, [rbp - 0x39]
lea rdx, [rbp - 0x19]
lea rcx, str.Did_not_copy__s_as__s:__s_n
call fcn.14004f2f0
movzx eax, word [0x1401e8f52]
test r15w, ax
je 0x14006cc21
cmp byte [0x1401e8f6b], r12b
je 0x14006cc08
lea rcx, str.Detected_minint_directory_with__minint_option:_nothing_to_patch_n
call fcn.14004f2f0
mov r12d, 1
jmp 0x14006d046
test al, 0x27
jne 0x14006d046
lea rcx, str.Detected_minint_directory_only_but_no__minint_option:_not_sure_what_to_do_n
call fcn.14004f2f0
jmp 0x14006d046
mov qword [rsp + 0x30], r12
lea rcx, [rbp - 0x39]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp - 0x79], rax
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14006cc78
call fcn.14004fba0
mov r8, rax
lea rdx, [rbp - 0x39]
lea rcx, str.Could_not_open__s_for_patching:__s_n
call fcn.14004f2f0
jmp 0x14006d046
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [rbp - 0x7d], edi
cmp eax, 0xffffffff
jne 0x14006cc9e
call fcn.14004fba0
lea rcx, str.Could_not_get_size_for_file__s:__s_n
jmp 0x14006d02c
mov rcx, rdi
call fcn.1400e8c84
mov r13, rax
test rax, rax
je 0x14006d038
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], r12
mov r8d, edi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006d020
cmp edi, dword [rsp + 0x48]
jne 0x14006d020
mov rdx, qword [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x14006cd06
call fcn.14004fba0
lea rcx, str.Could_not_rewind_file__s:__s_n
jmp 0x14006d02c
lea rdx, [rbp - 0x39]
lea rcx, str.Patching_file__s_n
call fcn.14004f2f0
cmp edi, 0x2061
jbe 0x14006cd48
cmp byte [r13 + 0x2060], 0x74
jne 0x14006cd48
cmp byte [r13 + 0x2061], 3
jne 0x14006cd48
lea rcx, str.__0x00002060:_0x74_0x03____0xEB_0x1A__disable_Win2k3_CRC_check__n
mov word [r13 + 0x2060], 0x1aeb
call fcn.14004f2f0
lea r15d, [rdi - 0x20]
mov esi, 1
mov dword [rsp + 0x40], r15d
cmp r15d, esi
jbe 0x14006cece
nop
mov ebx, esi
lea rcx, str._NULL_
add rbx, r13
lea rdx, str.minint_txtsetup.sif
mov r8d, 0x13
cmovne rcx, rbx
call fcn.1400fe258
test eax, eax
jne 0x14006ce0f
cmp r14d, 2
jb 0x14006cda9
mov r8d, 0x160
lea rdx, str.D:_a_rufus_rufus_srcwue.c
lea rcx, str.index___2
call fcn.1400fbe54
mov eax, r14d
lea rcx, str.__0x_08X:__s_____s_n
add rax, rax
mov r8, rbx
mov edx, esi
mov rdi, qword [rbp + rax*8 - 0x59]
mov r9, rdi
call fcn.14004f2f0
mov rcx, rdi
sub rbx, rdi
nop
movzx eax, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006cdd0
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], r12b
jne 0x14006cde5
cmp rax, 0x14
lea rcx, str.minint_txtsetup.sif
mov rax, 0xffffffffffffffff
cmovae rcx, rdi
inc rax
cmp byte [rcx + rax], r12b
jne 0x14006ce04
add esi, eax
mov ebx, esi
lea rcx, str._NULL_
add rbx, r13
lea rdx, str.minint_system32_
mov r8d, 0x10
cmovne rcx, rbx
call fcn.1400fe258
test eax, eax
jne 0x14006cebf
cmp r14d, 2
jb 0x14006ce58
mov r8d, 0x160
lea rdx, str.D:_a_rufus_rufus_srcwue.c
lea rcx, str.index___2
call fcn.1400fbe54
mov eax, r14d
lea rcx, str.__0x_08X:__s_____s_n
add rax, rax
mov r8, rbx
mov edx, esi
mov rdi, qword [rbp + rax*8 - 0x51]
mov r9, rdi
call fcn.14004f2f0
mov rcx, rdi
sub rbx, rdi
nop dword [rax]
movzx eax, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006ce80
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], r12b
jne 0x14006ce95
cmp rax, 0x11
lea rcx, str.minint_system32_
mov rax, 0xffffffffffffffff
cmovae rcx, rdi
inc rax
cmp byte [rcx + rax], r12b
jne 0x14006ceb4
add esi, eax
inc esi
cmp esi, r15d
jb 0x14006cd60
mov rbx, qword [rbp - 0x79]
cmp byte [0x1401e8f6b], r12b
jne 0x14006cfec
mov esi, r12d
test r15d, r15d
je 0x14006cfec
mov eax, r14d
lea r15, [rbp - 0x71]
mov r14, r12
mov rdi, r13
mov r12d, dword [rsp + 0x40]
lea r15, [r15 + rax*8]
nop dword [rax]
test rdi, rdi
lea rcx, str._NULL_
mov r8d, 7
lea rdx, str.rdisk_0_
cmovne rcx, rdi
call fcn.1400fe258
test eax, eax
jne 0x14006cf43
mov r9d, 0x31
mov byte [rdi + 6], 0x31
lea r8, str.rdisk_0_
mov edx, esi
lea rcx, str.__0x_08X:__s____rdisk__c__n
call fcn.14004f2f0
test rdi, rdi
lea rcx, str._NULL_
mov r8d, 0xb
lea rdx, str._win_nt_.bt
cmovne rcx, rdi
call fcn.1400fe258
test eax, eax
jne 0x14006cfd4
mov rbx, qword [r15]
lea rax, [rdi + 0xc]
mov r9, rbx
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rcx, str.__0x_08X:__s_____s_s_n
mov edx, esi
call fcn.14004f2f0
mov rdx, rdi
mov rcx, rbx
sub rdx, rbx
movzx eax, byte [rcx]
mov byte [rcx + rdx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006cf90
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], 0
jne 0x14006cfa5
movzx eax, byte [r14 + r13 + 0xc]
add rcx, r14
mov byte [rcx + r13], al
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], 0
jne 0x14006cfc2
add rax, r14
mov byte [rax + r13 + 1], 0
inc esi
inc rdi
inc r14
cmp esi, r12d
jb 0x14006cf00
mov rbx, qword [rbp - 0x79]
xor r12d, r12d
mov r8d, dword [rbp - 0x7d]
xor r9d, r9d
mov rdx, r13
mov rcx, rbx
call fcn.140050980
test eax, eax
jne 0x14006d018
call fcn.14004fba0
mov rdx, rax
lea rcx, str.Could_not_write_patched_file:__s_n
call fcn.14004f2f0
jmp 0x14006d038
mov r12d, 1
jmp 0x14006d038
call fcn.14004fba0
lea rcx, str.Could_not_read_file__s:__s_n
mov r8, rax
lea rdx, [rbp - 0x39]
call fcn.14004f2f0
test rbx, rbx
je 0x14006d046
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call fcn.1400e8c70
mov rbx, qword [rsp + 0x138]
mov eax, r12d
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400b2a30
lea r11, [rsp + 0x100]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret