Function at 0x14006d480
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 [0x1401e8fd2]
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 0x14006d525
lea r14d, [r12 + 1]
jmp 0x14006d53c
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.1400fc9f0
mov edx, 0x40
mov qword [rsp + 0x28], rsi
lea r9, str._c:_s_ntdetect.com
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x19]
lea r8, [rdx - 0x41]
call fcn.140004960
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc9f0
mov edx, 0x20
mov dword [rsp + 0x20], eax
lea r9, str._c:_ntdetect.com
lea rcx, [rbp - 0x39]
lea r8, [rdx - 0x21]
call fcn.140004960
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 [0x1401e8feb], r12b
jne 0x14006d69f
mov eax, r14d
lea rbx, [rbp - 0x71]
mov ecx, edi
lea rbx, [rbx + rax*8]
call fcn.1400fc9f0
mov ecx, eax
lea r9, str._c:_s_txtsetup.sif
mov rax, qword [rbx]
mov edx, 0x40
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
lea rcx, [rbp - 0x19]
lea r8, [rdx - 0x41]
call fcn.140004960
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc9f0
mov edx, 0x20
mov dword [rsp + 0x20], eax
lea r9, str._c:_txtsetup.sif
lea rcx, [rbp - 0x39]
lea r8, [rdx - 0x21]
call fcn.140004960
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 0x14006d665
call fcn.140050120
mov r9, rax
lea r8, [rbp - 0x39]
lea rdx, [rbp - 0x19]
lea rcx, str.Did_not_copy__s_as__s:__s_n
call fcn.14004f910
lea rcx, [rbp - 0x39]
call fcn.140027ab0
test rax, rax
jne 0x14006d688
lea rdx, [rbp - 0x39]
lea rcx, str.Failed_to_add_SetupSourceDevice_in__s_n
call fcn.14004f910
jmp 0x14006dbb6
lea r8, [rbp - 0x39]
lea rdx, str.SetupSourceDevice___deviceharddisk1partition1_
lea rcx, str.Successfully_added__s_to__s_n
call fcn.14004f910
mov ecx, edi
call fcn.1400fc9f0
mov edx, 0x40
mov qword [rsp + 0x28], rsi
lea r9, str._c:_s_setupldr.bin
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x19]
lea r8, [rdx - 0x41]
call fcn.140004960
mov ecx, edi
mov byte [rbp + 0x26], r12b
call fcn.1400fc9f0
mov edx, 0x20
mov dword [rsp + 0x20], eax
lea r9, str._c:BOOTMGR
lea rcx, [rbp - 0x39]
lea r8, [rdx - 0x21]
call fcn.140004960
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 0x14006d728
call fcn.140050120
mov r9, rax
lea r8, [rbp - 0x39]
lea rdx, [rbp - 0x19]
lea rcx, str.Did_not_copy__s_as__s:__s_n
call fcn.14004f910
movzx eax, word [0x1401e8fd2]
test r15w, ax
je 0x14006d76e
cmp byte [0x1401e8feb], r12b
je 0x14006d755
lea rcx, str.Detected_minint_directory_with__minint_option:_nothing_to_patch_n
call fcn.14004f910
mov r12d, 1
jmp 0x14006dbb6
test al, 0x27
jne 0x14006dbb6
lea rcx, str.Detected_minint_directory_only_but_no__minint_option:_not_sure_what_to_do_n
call fcn.14004f910
jmp 0x14006dbb6
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp - 0x39]
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp - 0x79], rax
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14006d7c3
call fcn.140050120
mov r8, rax
lea rdx, [rbp - 0x39]
lea rcx, str.Could_not_open__s_for_patching:__s_n
call fcn.14004f910
jmp 0x14006dbb6
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 0x14006d7e9
call fcn.140050120
lea rcx, str.Could_not_get_size_for_file__s:__s_n
jmp 0x14006db9c
mov rcx, rdi
call fcn.1400e9094
mov r13, rax
test rax, rax
je 0x14006dba8
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 0x14006db90
cmp edi, dword [rsp + 0x48]
jne 0x14006db90
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 0x14006d851
call fcn.140050120
lea rcx, str.Could_not_rewind_file__s:__s_n
jmp 0x14006db9c
lea rdx, [rbp - 0x39]
lea rcx, str.Patching_file__s_n
call fcn.14004f910
cmp edi, 0x2061
jbe 0x14006d893
cmp byte [r13 + 0x2060], 0x74
jne 0x14006d893
cmp byte [r13 + 0x2061], 3
jne 0x14006d893
lea rcx, str.__0x00002060:_0x74_0x03____0xEB_0x1A__disable_Win2k3_CRC_check__n
mov word [r13 + 0x2060], 0x1aeb
call fcn.14004f910
lea r15d, [rdi - 0x20]
mov esi, 1
mov dword [rsp + 0x40], r15d
cmp r15d, 1
jbe 0x14006da3b
lea r12, str.minint_system32_
mov ebx, esi
lea rcx, str._NULL_
add rbx, r13
lea rdx, str.minint_txtsetup.sif
mov r8d, 0x13
cmovne rcx, rbx
call fcn.1400fe668
test eax, eax
jne 0x14006d95f
cmp r14d, 2
jb 0x14006d8fb
mov r8d, 0x159
lea rdx, str.D:_a_rufus_rufus_srcwue.c
lea rcx, str.index___2
call fcn.1400fc264
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.14004f910
mov rcx, rdi
sub rbx, rdi
movzx eax, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006d920
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], 0
jne 0x14006d935
cmp rax, 0x14
lea rcx, str.minint_txtsetup.sif
mov rax, 0xffffffffffffffff
cmovae rcx, rdi
inc rax
cmp byte [rcx + rax], 0
jne 0x14006d954
add esi, eax
lea rdi, [rsi + r13]
mov r8d, 0x10
test rdi, rdi
lea rcx, str._NULL_
mov rdx, r12
cmovne rcx, rdi
call fcn.1400fe668
test eax, eax
jne 0x14006da29
cmp r14d, 2
jb 0x14006d9a6
mov r8d, 0x159
lea rdx, str.D:_a_rufus_rufus_srcwue.c
lea rcx, str.index___2
call fcn.1400fc264
mov eax, r14d
lea rcx, str.__0x_08X:__s_____s_n
add rax, rax
mov r8, rdi
mov edx, esi
mov rbx, qword [rbp + rax*8 - 0x51]
mov r9, rbx
call fcn.14004f910
mov rcx, rbx
sub rdi, rbx
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdi + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006d9d0
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], 0
jne 0x14006d9e5
mov rax, 0xffffffffffffffff
lea rdi, str.minint_system32_
nop dword [rax]
inc rax
cmp byte [rdi + rax], 0
jne 0x14006da00
cmp rax, rcx
mov rax, 0xffffffffffffffff
cmova rbx, rdi
inc rax
cmp byte [rbx + rax], 0
jne 0x14006da17
add esi, eax
lea r12, str.minint_system32_
inc esi
cmp esi, r15d
jb 0x14006d8b2
mov rbx, qword [rbp - 0x79]
xor r12d, r12d
cmp byte [0x1401e8feb], 0
jne 0x14006db5c
mov esi, r12d
test r15d, r15d
je 0x14006db5c
mov eax, r14d
lea r15, [rbp - 0x71]
mov r14, r12
mov rdi, r13
mov r12d, dword [rsp + 0x40]
lea r15, [r15 + rax*8]
nop word [rax + rax]
test rdi, rdi
lea rcx, str._NULL_
mov r8d, 7
lea rdx, str.rdisk_0_
cmovne rcx, rdi
call fcn.1400fe668
test eax, eax
jne 0x14006dab1
lea r9d, [rax + 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.14004f910
test rdi, rdi
lea rcx, str._NULL_
mov r8d, 0xb
lea rdx, str._win_nt_.bt
cmovne rcx, rdi
call fcn.1400fe668
test eax, eax
jne 0x14006db44
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.14004f910
mov rdx, rdi
mov rcx, rbx
sub rdx, rbx
nop
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14006db00
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], 0
jne 0x14006db15
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 0x14006db32
add rax, r14
mov byte [rax + r13 + 1], 0
inc esi
inc rdi
inc r14
cmp esi, r12d
jb 0x14006da70
mov rbx, qword [rbp - 0x79]
xor r12d, r12d
mov r8d, dword [rbp - 0x7d]
xor r9d, r9d
mov rdx, r13
mov rcx, rbx
call fcn.140050f30
test eax, eax
jne 0x14006db88
call fcn.140050120
mov rdx, rax
lea rcx, str.Could_not_write_patched_file:__s_n
call fcn.14004f910
jmp 0x14006dba8
mov r12d, 1
jmp 0x14006dba8
call fcn.140050120
lea rcx, str.Could_not_read_file__s:__s_n
mov r8, rax
lea rdx, [rbp - 0x39]
call fcn.14004f910
test rbx, rbx
je 0x14006dbb6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call fcn.1400e9080
mov rbx, qword [rsp + 0x138]
mov eax, r12d
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400b1f80
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