Function at 0x14000f980
Capabilities:
Print debug messages
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
xor ebx, ebx
mov edi, edx
mov rdx, qword [0x1401e8fb0]
test edi, edi
mov rbp, 0xffffffffffffffff
mov qword [rsp + 0xd8], rbx
cmovne rdx, qword [0x1401e9100]
mov rsi, rcx
mov qword [rsp + 0x58], rdx
mov r15d, ebx
mov qword [rsp + 0x60], rdx
mov r14d, ebx
mov edx, dword [0x1401e9110]
mov r12d, ebx
mov qword [rsp + 0x48], rbp
mov r13d, ebx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x68], rbx
cmp edx, 0x200
jae 0x14000fa02
lea rcx, str.Unexpected_sector_size___d____Aborting
call fcn.14004f910
xor eax, eax
jmp 0x1400109aa
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x14000fa21
lea rcx, str.Warning:_Unable_to_rewind_image_position___wrong_data_might_be_copied_
call fcn.14004f910
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor r8d, r8d
xor edx, edx
mov ecx, ebp
call fcn.140066e30
test edi, edi
je 0x1400100a8
cmp dword [0x14019f518], ebx
lea rax, str.Fast_zeroing_drive:
lea rcx, str.Zeroing_drive:
cmovne rcx, rax
call fcn.14004f910
mov ecx, dword [0x1401e9110]
xor edx, edx
lea rax, [rcx + 0x1ffffff]
div rcx
mov edx, ecx
mov rsi, rax
imul esi, ecx
mov ecx, esi
mov ebp, esi
call fcn.1400c44fc
mov qword [rsp + 0xd8], rax
mov r14, rax
test rax, rax
jne 0x14000faac
lea rcx, str.Could_not_allocate_disk_zeroing_buffer
mov dword [0x14019f0a0], 0xc0030008
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
jmp 0x140010110
mov ecx, dword [0x1401e9110]
xor edx, edx
div rcx
test rdx, rdx
je 0x14000fad5
mov r8d, 0x49f
lea rdx, str.D:_a_rufus_rufus_src_format.c
lea rcx, str._uintptr_t_buffer___SelectedDrive.SectorSize__0
call fcn.1400fc264
mov edi, dword [0x14019f518]
mov r8, rbp
mov eax, edi
mov rcx, r14
neg eax
sbb edx, edx
movzx edx, dl
call fcn.140136960
test edi, edi
je 0x14000fb57
mov edx, dword [0x1401e9110]
mov rcx, rbp
call fcn.1400c44fc
mov qword [rsp + 0x40], rax
mov rdi, rax
test rax, rax
jne 0x14000fb2e
lea rcx, str.Could_not_allocate_disk_comparison_buffer
mov dword [0x14019f0a0], 0xc0030008
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
jmp 0x140010113
mov ecx, dword [0x1401e9110]
xor edx, edx
div rcx
test rdx, rdx
je 0x14000fb57
mov r8d, 0x4ab
lea rdx, str.D:_a_rufus_rufus_src_format.c
lea rcx, str._uintptr_t_cmp_buffer___SelectedDrive.SectorSize__0
call fcn.1400fc264
mov r13, qword [rsp + 0x58]
mov r14, rbx
mov dword [rsp + 0x50], esi
mov dword [rsp + 0xc8], ebx
test r13, r13
je 0x14000fe1d
cmp dword [0x14019f518], ebx
mov eax, 0xcea
mov edx, 0xcd6
mov dword [rsp + 0x20], ebx
cmovne edx, eax
mov r9, r13
mov r8, r14
mov ecx, 4
call fcn.140066e30
xor edx, edx
lea rax, [r14 + r14*4]
shl rax, 4
div r13
mov rbp, rax
cmp rax, r15
jbe 0x14000fcb9
cmp r15, 0x50
jae 0x14000fcb9
mov dword [rsp + 0x28], ebx
lea r8, [0x140158cf0]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
cmp esi, 1
jle 0x14000fc2c
mov rcx, rsi
mov edx, 2
call fcn.1400c537c
mov rdi, rax
test rax, rax
je 0x14000fc2c
mov dword [rsp + 0x28], esi
lea r8, [0x140158cf0]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x14000fc2f
mov rcx, rdi
call fcn.1400e9080
mov rdi, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [0x14019f5c8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000fca5
mov r9d, 0x7ffffffe
mov edx, 0xb1
mov r8d, r9d
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
mov r9, rdi
xor r8d, r8d
mov edx, 0xc2
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xba
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r8d, r8d
movsxd r9, eax
mov edx, 0xb6
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, rdi
call fcn.1400e9080
inc r15
cmp rbp, r15
ja 0x14000fbb3
mov r8d, dword [rsp + 0x50]
lea rax, [r14 + r8]
cmp rax, r13
jbe 0x14000fcd2
mov r8d, r13d
sub r8d, r14d
mov dword [rsp + 0x50], r8d
mov ecx, dword [0x1401e9110]
xor edx, edx
mov eax, r8d
div ecx
test edx, edx
je 0x14000fcf9
xor edx, edx
lea eax, [rcx - 1]
add eax, r8d
div ecx
mov r8d, eax
imul r8d, ecx
mov dword [rsp + 0x50], r8d
test r12d, r12d
je 0x14000fd70
dec r12d
mov rsi, qword [rsp + 0xc0]
mov edi, 1
nop
mov eax, dword [0x14019f0a0]
test eax, eax
jns 0x14000fd24
cmp ax, 0x4c7
je 0x140010073
mov rdx, qword [rsp + 0xd8]
lea r9, [rsp + 0xc8]
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000ff97
mov edx, dword [rsp + 0xc8]
mov r8d, dword [rsp + 0x50]
cmp edx, r8d
je 0x14000fe0f
lea rcx, str._r_nWrite_error:_Wrote__d_bytes__expected__d_bytes
call fcn.14004f910
jmp 0x14000ffbc
cmp dword [0x14019f518], ebx
je 0x14000fd01
mov eax, dword [0x14019f0a0]
test eax, eax
jns 0x14000fd8c
cmp ax, 0x4c7
je 0x140010073
mov rdi, qword [rsp + 0x40]
lea r9, [rsp + 0xd0]
mov rsi, qword [rsp + 0xc0]
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140010039
mov edx, dword [rsp + 0x50]
cmp dword [rsp + 0xd0], edx
jne 0x140010039
mov r9d, dword [rdi]
lea eax, [r9 + 1]
test eax, 0xfffffffe
jne 0x14000ff6d
mov r8d, edx
mov ecx, 1
shr r8d, 2
cmp ecx, r8d
jae 0x14000fe08
nop
mov eax, ecx
cmp dword [rdi + rax*4], r9d
jne 0x14000fdff
inc ecx
cmp ecx, r8d
jb 0x14000fdf0
cmp ecx, r8d
jb 0x14000ff6d
mov dword [rsp + 0xc8], edx
mov eax, edx
add r14, rax
cmp r14, r13
jb 0x14000fb73
mov dword [rsp + 0x28], ebx
lea r8, [0x14015901c]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
cmp esi, 1
jle 0x14000fe8c
mov edx, 2
mov rcx, rsi
call fcn.1400c537c
mov rdi, rax
test rax, rax
je 0x14000fe8c
mov dword [rsp + 0x28], esi
lea r8, [0x14015901c]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x14000fe8f
mov rcx, rdi
call fcn.1400e9080
mov rdi, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [0x14019f5c8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000ff05
mov r9d, 0x7ffffffe
mov edx, 0xb1
mov r8d, r9d
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
mov r9, rdi
xor r8d, r8d
mov edx, 0xc2
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xba
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r8d, r8d
movsxd r9, eax
mov edx, 0xb6
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, rdi
call fcn.1400e9080
mov rcx, qword [rsp + 0xc0]
xor r9d, r9d
mov qword [rsp + 0x38], rbx
xor r8d, r8d
mov qword [rsp + 0x30], rbx
mov edx, 0x70140
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x14000ff51
call fcn.140050120
mov rdx, rax
lea rcx, str.Could_not_refresh_drive_layout:__s
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov ebx, 1
mov r14, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x40]
jmp 0x140010113
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140010013
mov r8d, dword [rsp + 0x50]
mov r12d, 0xf
jmp 0x14000fd09
call fcn.140050120
mov ecx, dword [0x1401e9110]
mov r8, rax
xor edx, edx
mov rax, r14
div rcx
lea rcx, str._r_nWrite_error_at_sector__lld:__s
mov rdx, rax
call fcn.14004f910
cmp edi, 4
jae 0x14001008a
mov edx, 5
lea rcx, str.Retrying_in__d_seconds...
call fcn.14004f910
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001005f
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 4
ja 0x140010073
mov r8d, dword [rsp + 0x50]
jmp 0x14000fd10
call fcn.140050120
mov rdx, rax
lea rcx, str._r_nError:_Could_not_reset_position____s
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
jmp 0x140010113
call fcn.140050120
mov rdx, rax
lea rcx, str._r_nRead_error:_Could_not_read_data_for_fast_zeroing_comparison____s
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
jmp 0x140010113
call fcn.140050120
mov rdx, rax
lea rcx, str.Write_error:_Could_not_reset_position____s
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x40]
jmp 0x140010113
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x40]
mov dword [0x14019f0a0], 0xc003001d
jmp 0x140010113
movzx ecx, byte [0x1401e8fec]
lea eax, [rcx - 1]
cmp al, 7
ja 0x14001038b
lea rcx, str.Writing_compressed_image:
call fcn.14004f910
mov rcx, qword [0x14019f508]
mov dword [rsp + 0x28], 0x8000000
call fcn.14000c370
mov qword [rsp + 0x48], rax
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140010140
call fcn.140050120
mov rdx, qword [0x14019f508]
lea rcx, str.Could_not_open_image__s:__s
mov r8, rax
call fcn.14004f910
mov dword [0x14019f0a0], 0xc003006e
mov r14, rbx
mov rdi, rbx
movzx eax, byte [0x1401e8fec]
dec al
cmp al, 7
lea rax, [rbp - 1]
ja 0x140010969
cmp rax, 0xfffffffffffffffd
ja 0x14001098b
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14001098b
mov ecx, dword [0x1401e9110]
mov edx, ecx
call fcn.1400c44fc
mov qword [0x14019f0a8], rax
test rax, rax
jne 0x140010171
lea rcx, str.Could_not_allocate_disk_write_buffer
mov dword [0x14019f0a0], 0xc0030008
call fcn.14004f910
jmp 0x14001010d
mov ecx, dword [0x1401e9110]
xor edx, edx
div rcx
test rdx, rdx
je 0x14001019a
mov r8d, 0x50d
lea rdx, str.D:_a_rufus_rufus_src_format.c
lea rcx, str._uintptr_t_sec_buf___SelectedDrive.SectorSize__0
call fcn.1400fc264
lea rax, [0x14019f0a0]
mov dword [0x1401d0598], ebx
mov qword [rsp + 0x30], rax
lea r9, [0x14000f830]
lea rax, [0x14000f6d0]
mov qword [rsp + 0x28], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [fcn.14004f910]
mov ecx, 0x40000
call fcn.140087550
movzx r8d, byte [0x1401e8fec]
mov rdx, rsi
mov rcx, rbp
call fcn.140087d30
mov rbp, rax
call fcn.140087500
mov r9d, 0xffffffff
mov dword [rsp + 0x28], ebx
lea r8, [0x14015901c]
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
cmp esi, 1
jle 0x140010262
mov rcx, rsi
mov edx, 2
call fcn.1400c537c
mov rdi, rax
test rax, rax
je 0x140010262
mov dword [rsp + 0x28], esi
lea r8, [0x14015901c]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x140010265
mov rcx, rdi
call fcn.1400e9080
mov rdi, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [0x14019f5c8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400102db
mov r9d, 0x7ffffffe
mov edx, 0xb1
mov r8d, r9d
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
mov r9, rdi
xor r8d, r8d
mov edx, 0xc2
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xba
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r8d, r8d
movsxd r9, eax
mov edx, 0xb6
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, rdi
call fcn.1400e9080
test rbp, rbp
js 0x14001033d
cmp dword [0x1401d0598], ebx
je 0x14001033d
lea rcx, str.Notice:_Compressed_image_data_didnt_end_on_block_boundary.
call fcn.14004f910
mov r8d, dword [0x1401e9110]
lea r9, [rsp + 0xc8]
mov rdx, qword [0x14019f0a8]
mov rcx, qword [rsp + 0xc0]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x14019f0a8]
call fcn.1400c44e0
mov qword [0x14019f0a8], rbx
jmp 0x14000ff0d
mov rcx, qword [0x14019f0a8]
call fcn.1400c44e0
mov qword [0x14019f0a8], rbx
test rbp, rbp
jns 0x14000ff0d
cmp word [0x14019f0a0], 0x4c7
je 0x14000ff0d
mov rdx, rbp
lea rcx, str.Could_not_write_compressed_image:__lld
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov dword [0x14019f0a0], 0xc003001d
jmp 0x14001010d
cmp cl, 9
jne 0x1400103b0
mov r8d, 0x523
lea rdx, str.D:_a_rufus_rufus_src_format.c
lea rcx, str.img_report.compression_type___IMG_COMPRESSION_FFU
call fcn.1400fc264
movzx ecx, byte [0x1401e8fec]
sub cl, 0xa
cmp cl, 1
ja 0x1400103ef
mov rcx, qword [0x14019f508]
lea rdx, [rsp + 0x60]
call fcn.14006b4b0
mov qword [rsp + 0x68], rax
mov r14, rax
test rax, rax
je 0x14001010d
mov rsi, qword [rsp + 0x60]
mov qword [rsp + 0x58], rsi
test rsi, rsi
je 0x14001010d
jmp 0x1400103f4
mov rsi, qword [rsp + 0x58]
mov rdi, qword [0x14019f508]
mov edx, 1
test r14, r14
cmovne rdi, r14
lea ecx, [rdx + 0x37]
call fcn.1400c537c
mov qword [rsp + 0x48], rax
mov rbp, rax
test rax, rax
jne 0x14001042d
lea ecx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbp, rbx
jmp 0x1400100e8
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, rdi
mov dword [rsp + 0x28], 0x48000000
mov qword [rbp + 0x28], rax
call fcn.14000c370
mov qword [rbp], rax
cmp rax, 0xffffffffffffffff
jne 0x140010477
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call fcn.1400e9080
mov rbp, rbx
jmp 0x1400100e8
mov ecx, dword [0x1401e9110]
xor edx, edx
mov r8d, ecx
lea rax, [rcx + 0x1ffffff]
div rcx
mov edx, r8d
mov r12, rax
imul r12d, ecx
lea ecx, [r12 + r12]
call fcn.1400c44fc
mov qword [rsp + 0xd8], rax
mov r14, rax
test rax, rax
jne 0x1400104ca
lea rcx, str.Could_not_allocate_disk_write_buffer
mov dword [0x14019f0a0], 0xc0030008
call fcn.14004f910
jmp 0x140010110
mov ecx, dword [0x1401e9110]
xor edx, edx
div rcx
test rdx, rdx
je 0x1400104f3
mov r8d, 0x53d
lea rdx, str.D:_a_rufus_rufus_src_format.c
lea rcx, str._uintptr_t_buffer___SelectedDrive.SectorSize__0
call fcn.1400fc264
mov rcx, qword [rbp]
lea rdi, [rbp + 0x10]
xor r9d, r9d
mov qword [rsp + 0x60], rdi
mov r8d, r12d
mov qword [rsp + 0x20], rdi
mov rdx, r14
mov dword [rbp + 0x30], ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14001052f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
mov ecx, ebx
setne cl
dec ecx
jmp 0x140010534
mov ecx, 1
mov dword [rbp + 8], ecx
mov r14, rbx
mov dword [rsp + 0x54], 1
nop dword [rax]
nop word [rax + rax]
mov r9, rsi
mov dword [rsp + 0x20], ebx
mov r8, r14
mov edx, 0xcbd
mov ecx, 4
call fcn.140066e30
xor edx, edx
lea rax, [r14 + r14*4]
shl rax, 4
div rsi
mov rbp, rax
cmp rax, r15
jbe 0x140010692
cmp r15, 0x50
jae 0x140010688
mov dword [rsp + 0x28], ebx
lea r8, [0x140158cf0]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
cmp esi, 1
jle 0x1400105fb
mov rcx, rsi
mov edx, 2
call fcn.1400c537c
mov rdi, rax
test rax, rax
je 0x1400105fb
mov dword [rsp + 0x28], esi
lea r8, [0x140158cf0]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x1400105fe
mov rcx, rdi
call fcn.1400e9080
mov rdi, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [0x14019f5c8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140010674
mov r9d, 0x7ffffffe
mov edx, 0xb1
mov r8d, r9d
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
mov r9, rdi
xor r8d, r8d
mov edx, 0xc2
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xba
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x14019f5c8]
xor r8d, r8d
movsxd r9, eax
mov edx, 0xb6
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, rdi
call fcn.1400e9080
inc r15
cmp rbp, r15
ja 0x140010582
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
cmp r14, rsi
jae 0x14000fe1d
mov rbp, qword [rsp + 0x48]
cmp dword [rbp + 8], ebx
jg 0x1400106bc
mov rcx, qword [rbp + 0x28]
mov edx, 0x3a98
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14001093e
movsxd rax, r13d
lea rsi, [rsp + 0x50]
lea rsi, [rsi + rax*4]
mov eax, dword [rbp + 8]
test eax, eax
je 0x14001093c
cmp dword [rbp + 0x30], ebx
jne 0x14001092f
mov rcx, qword [rbp]
mov r9d, 0x1388
shr eax, 0x1f
mov r8, rsi
mov rdx, rdi
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_GetOverlappedResultEx]
test eax, eax
jne 0x140010724
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x140010715
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1b
mov eax, ebx
jne 0x14001071a
mov eax, 1
test eax, eax
je 0x14001093e
jmp 0x140010731
mov eax, dword [rsi]
add qword [rbp + 0x20], rax
mov dword [rbp + 0x30], 1
mov ecx, dword [rsi]
mov rdx, qword [rsp + 0x58]
lea rax, [r14 + rcx]
cmp rax, rdx
jbe 0x14001074a
mov eax, edx
sub eax, r14d
mov ecx, eax
mov dword [rsi], eax
mov r8d, dword [0x1401e9110]
xor edx, edx
mov eax, ecx
div r8d
test edx, edx
je 0x14001076d
xor edx, edx
lea eax, [r8 - 1]
add eax, ecx
div r8d
imul eax, r8d
mov dword [rsi], eax
mov ebp, r13d
inc r13d
and r13d, 0x80000001
jge 0x140010786
dec r13d
or r13d, 0xfffffffe
inc r13d
mov rcx, qword [rsp + 0x48]
mov edx, r12d
imul edx, r13d
xor r9d, r9d
mov r8d, r12d
mov qword [rsp + 0x20], rdi
mov dword [rcx + 0x30], ebx
mov rcx, qword [rcx]
add rdx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400107c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
mov ecx, ebx
setne cl
dec ecx
jmp 0x1400107ce
mov ecx, 1
mov rax, qword [rsp + 0x48]
mov edi, 1
mov dword [rax + 8], ecx
nop dword [rax + rax]
mov eax, dword [0x14019f0a0]
test eax, eax
jns 0x1400107f4
cmp ax, 0x4c7
je 0x140010901
mov r8d, dword [rsi]
lea r9, [rsp + 0xc8]
mov rcx, qword [rsp + 0xc0]
mov edx, r12d
imul edx, ebp
mov qword [rsp + 0x20], rbx
add rdx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140010846
mov ecx, dword [rsi]
mov edx, dword [rsp + 0xc8]
cmp edx, ecx
je 0x1400108d3
mov r8d, ecx
lea rcx, str._r_nWrite_error:_Wrote__d_bytes__expected__d_bytes
call fcn.14004f910
jmp 0x14001086b
call fcn.140050120
mov ecx, dword [0x1401e9110]
mov r8, rax
xor edx, edx
mov rax, r14
div rcx
lea rcx, str._r_nWrite_error_at_sector__lld:__s
mov rdx, rax
call fcn.14004f910
cmp edi, 4
jae 0x140010913
mov edx, 5
lea rcx, str.Retrying_in__d_seconds...
call fcn.14004f910
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400108ed
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 4
jbe 0x1400107e0
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
jmp 0x140010110
add r14, rcx
test ecx, ecx
je 0x14000fe1d
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
jmp 0x140010550
call fcn.140050120
mov rdx, rax
lea rcx, str.Write_error:_Could_not_reset_position____s
call fcn.14004f910
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
jmp 0x140010110
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0xd8]
mov dword [0x14019f0a0], 0xc003001d
jmp 0x140010110
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14001093e
mov dword [rsi], ebx
call fcn.140050120
mov rdx, rax
lea rcx, str._r_nRead_error:__s
call fcn.14004f910
mov r14, qword [rsp + 0xd8]
mov dword [0x14019f0a0], 0xc003001e
jmp 0x140010110
cmp rax, 0xfffffffffffffffd
ja 0x14001098b
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call fcn.1400e9080
cmp qword [rsp + 0x68], 0
je 0x140010998
call fcn.14006b900
mov rcx, r14
call fcn.1400c44e0
mov rcx, rdi
call fcn.1400c44e0
mov eax, ebx
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret