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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov bl, cl
mov dword [ebp - 0xb4], str.i386
mov cx, word [0x5a305a]
mov edx, 0x1c0
mov al, cl
mov dword [ebp - 0xb0], str.amd64
push esi
xor esi, esi
mov dword [ebp - 0xac], str.minint
and al, 0x23
mov dword [ebp - 0xec], str.minint_txtsetup.sif
mov dword [ebp - 0xe8], str.minint_system32_
mov dword [ebp - 0xc4], str.i386_txtsetup.sif
mov dword [ebp - 0xc0], str.i386_system32_
mov dword [ebp - 0xbc], str._amd64_txtsetup.sif
mov dword [ebp - 0xb8], str._amd64_system32_
mov dword [ebp - 0xdc], esi
mov dword [ebp - 0xc8], esi
push edi
cmp al, 0x23
jne 0x46496b
mov esi, 1
jmp 0x46497b
mov eax, edx
and ax, cx
mov ecx, 2
cmp ax, dx
cmove esi, ecx
push 0
push 0
push 0x147
push dword [0x5a28a0]
mov dword [ebp - 0xd4], esi
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
push str.SetupSourceDevice___deviceharddisk_dpartition1_
lea eax, [ebp - 0xa8]
push 0x40
push eax
call fcn.004050d0
shr esi, 1
add esp, 0x10
mov byte [ebp - 0x69], 0
mov eax, dword [ebp + esi*8 - 0xb4]
push eax
movsx esi, bl
push esi
mov dword [ebp - 0xd8], eax
call fcn.004e01e0
add esp, 4
push eax
push str._c:_s_ntdetect.com
lea eax, [ebp - 0x68]
push 0x40
push eax
call fcn.004050d0
add esp, 0x14
mov byte [ebp - 0x29], 0
push esi
call fcn.004e01e0
add esp, 4
push eax
push str._c:_ntdetect.com
lea eax, [ebp - 0x24]
push 0x20
push eax
call fcn.004050d0
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x24]
add esp, 0x10
mov byte [ebp - 5], 0
push 1
push eax
lea eax, [ebp - 0x68]
push eax
call edi
cmp byte [0x5a3072], 0
jne 0x464ae0
mov eax, dword [ebp - 0xd4]
push dword [ebp + eax*4 - 0xb4]
push esi
call fcn.004e01e0
add esp, 4
push eax
push str._c:_s_txtsetup.sif
lea eax, [ebp - 0x68]
push 0x40
push eax
call fcn.004050d0
add esp, 0x14
mov byte [ebp - 0x29], 0
push esi
call fcn.004e01e0
add esp, 4
push eax
push str._c:_txtsetup.sif
lea eax, [ebp - 0x24]
push 0x20
push eax
call fcn.004050d0
add esp, 0x10
mov byte [ebp - 5], 0
lea eax, [ebp - 0x24]
push 1
push eax
lea eax, [ebp - 0x68]
push eax
call edi
test eax, eax
jne 0x464a9f
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
push str.Did_not_copy__s_as__s:__s_n
call fcn.0044b0b0
add esp, 0x10
push ecx
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x24]
call fcn.00425c20
add esp, 8
test eax, eax
lea eax, [ebp - 0x24]
push eax
jne 0x464acc
push str.Failed_to_add_SetupSourceDevice_in__s_n
call fcn.0044b0b0
add esp, 8
jmp 0x464f8d
lea eax, [ebp - 0xa8]
push eax
push str.Successfully_added__s_to__s_n
call fcn.0044b0b0
add esp, 0xc
push dword [ebp - 0xd8]
push esi
call fcn.004e01e0
add esp, 4
push eax
push str._c:_s_setupldr.bin
lea eax, [ebp - 0x68]
push 0x40
push eax
call fcn.004050d0
add esp, 0x14
mov byte [ebp - 0x29], 0
push esi
call fcn.004e01e0
add esp, 4
push eax
push str._c:BOOTMGR
lea eax, [ebp - 0x24]
push 0x20
push eax
call fcn.004050d0
add esp, 0x10
mov byte [ebp - 5], 0
lea eax, [ebp - 0x24]
push 1
push eax
lea eax, [ebp - 0x68]
push eax
call edi
test eax, eax
jne 0x464b53
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
push str.Did_not_copy__s_as__s:__s_n
call fcn.0044b0b0
add esp, 0x10
mov ax, word [0x5a305a]
mov ecx, 0x1c0
test cx, ax
je 0x464ba2
cmp byte [0x5a3072], 0
je 0x464b88
push str.Detected_minint_directory_with__minint_option:_nothing_to_patch_n
call fcn.0044b0b0
add esp, 4
mov dword [ebp - 0xdc], 1
jmp 0x464f8d
test al, 0x27
jne 0x464f8d
push str.Detected_minint_directory_only_but_no__minint_option:_not_sure_what_to_do_n
call fcn.0044b0b0
add esp, 4
jmp 0x464f8d
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0xe4], ebx
cmp ebx, 0xffffffff
jne 0x464be7
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
push str.Could_not_open__s_for_patching:__s_n
call fcn.0044b0b0
add esp, 0xc
jmp 0x464f8d
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0xd8], edi
cmp edi, 0xffffffff
jne 0x464c11
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
push str.Could_not_get_size_for_file__s:__s_n
jmp 0x464f7a
push edi
call fcn.004d122c
mov esi, eax
add esp, 4
mov dword [ebp - 0xc8], esi
test esi, esi
je 0x464f82
push 0
lea eax, [ebp - 0xe0]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x464f6b
cmp edi, dword [ebp - 0xe0]
jne 0x464f6b
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x464c77
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
push str.Could_not_rewind_file__s:__s_n
jmp 0x464f7a
lea eax, [ebp - 0x24]
push eax
push str.Patching_file__s_n
call fcn.0044b0b0
add esp, 8
cmp edi, 0x2061
jbe 0x464cb8
cmp byte [esi + 0x2060], 0x74
jne 0x464cb8
cmp byte [esi + 0x2061], 3
jne 0x464cb8
push str.__0x00002060:_0x74_0x03____0xEB_0x1A__disable_Win2k3_CRC_check__n
mov word [esi + 0x2060], 0x1aeb
call fcn.0044b0b0
add esp, 4
mov ebx, 1
lea eax, [edi - 0x20]
mov dword [ebp - 0xcc], ebx
cmp eax, ebx
jbe 0x464e13
nop
xor eax, eax
mov dword [ebp - 0xd0], eax
nop dword [eax + eax]
mov esi, dword [ebp + eax*4 - 0xec]
mov edi, esi
lea ecx, [edi + 1]
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x464cf0
sub edi, ecx
mov edx, str._NULL_
test esi, esi
mov ecx, str._NULL_
cmovne edx, esi
add ebx, dword [ebp - 0xc8]
lea eax, [edi - 1]
push eax
cmovne ecx, ebx
push edx
push ecx
call fcn.004e18db
add esp, 0xc
test eax, eax
jne 0x464dd9
mov edi, dword [ebp - 0xd4]
cmp edi, 2
jb 0x464d49
push 0x159
push str.D:_a_rufus_rufus_srcwue.c
push str.index___2
call fcn.004dfbbc
add esp, 0xc
mov eax, dword [ebp - 0xd0]
lea eax, [eax + edi*2]
mov edi, dword [ebp + eax*4 - 0xc4]
push edi
push ebx
push dword [ebp - 0xcc]
push str.__0x_08X:__s_____s_n
call fcn.0044b0b0
add esp, 0x10
mov ecx, edi
sub ebx, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x464d72
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x464d84
sub ecx, edx
mov edx, edi
lea ebx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x464d92
sub edx, ebx
cmp ecx, edx
jbe 0x464dbb
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x464da2
mov ebx, dword [ebp - 0xcc]
sub esi, ecx
add ebx, esi
mov dword [ebp - 0xcc], ebx
jmp 0x464ddf
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x464dc0
mov ebx, dword [ebp - 0xcc]
sub esi, ecx
add ebx, esi
mov dword [ebp - 0xcc], ebx
jmp 0x464ddf
mov ebx, dword [ebp - 0xcc]
mov eax, dword [ebp - 0xd0]
inc eax
mov dword [ebp - 0xd0], eax
cmp eax, 2
jb 0x464ce0
mov edi, dword [ebp - 0xd8]
inc ebx
mov dword [ebp - 0xcc], ebx
lea eax, [edi - 0x20]
cmp ebx, eax
jb 0x464cd0
mov esi, dword [ebp - 0xc8]
cmp byte [0x5a3072], 0
jne 0x464f2b
xor ebx, ebx
test eax, eax
je 0x464f2b
nop word [eax + eax]
add esi, ebx
mov eax, str._NULL_
push 7
cmovne eax, esi
push str.rdisk_0_
push eax
call fcn.004e18db
add esp, 0xc
test eax, eax
jne 0x464e7d
push eax
push eax
push 0x147
push dword [0x5a28a0]
call dword [sym.imp.USER32.dll_SendMessageW]
add al, 0x30
mov byte [esi + 6], al
movsx eax, al
push eax
push str.rdisk_0_
push ebx
push str.__0x_08X:__s____rdisk__c__n
call fcn.0044b0b0
add esp, 0x10
test esi, esi
mov eax, str._NULL_
push 0xb
cmovne eax, esi
push str._win_nt_.bt
push eax
call fcn.004e18db
add esp, 0xc
test eax, eax
jne 0x464f19
mov ecx, dword [ebp - 0xd4]
lea eax, [esi + 0xc]
push eax
mov dword [ebp - 0xd0], eax
mov edi, dword [ebp + ecx*4 - 0xb4]
push edi
push esi
push ebx
push str.__0x_08X:__s_____s_s_n
call fcn.0044b0b0
add esp, 0x14
mov ecx, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi], al
lea esi, [esi + 1]
test al, al
jne 0x464ec8
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x464ee0
mov eax, dword [ebp - 0xd0]
sub ecx, edx
mov esi, dword [ebp - 0xc8]
add ecx, ebx
mov al, byte [eax]
mov byte [ecx + esi], al
lea ecx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x464f00
sub edi, ecx
lea eax, [edi + ebx]
mov edi, dword [ebp - 0xd8]
mov byte [eax + esi + 1], 0
jmp 0x464f1f
mov esi, dword [ebp - 0xc8]
inc ebx
lea eax, [edi - 0x20]
cmp ebx, eax
jb 0x464e30
mov ebx, dword [ebp - 0xe4]
lea eax, [ebp - 0xe0]
push ecx
push eax
push edi
mov edx, esi
mov ecx, ebx
call fcn.0044c2e0
add esp, 0xc
test eax, eax
jne 0x464f5f
call fcn.0044b6b0
push eax
push str.Could_not_write_patched_file:__s_n
call fcn.0044b0b0
add esp, 8
jmp 0x464f82
mov dword [ebp - 0xdc], 1
jmp 0x464f82
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x24]
push eax
push str.Could_not_read_file__s:__s_n
call fcn.0044b0b0
add esp, 0xc
test ebx, ebx
je 0x464f8d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc8]
call fcn.004d1211
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0xdc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a8b60
mov esp, ebp
pop ebp
ret