Function at 0x180013840
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rdi
push r13
push r15
mov eax, 0x20c0
call fcn.18003c6a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2090], rax
xor edi, edi
mov rbx, rcx
mov rcx, qword [rcx + 0x34]
mov r10, r8
mov qword [rsp + 0x80], r8
mov r8, qword [rdx + 0x8b]
mov qword [rsp + 0x40], r9
mov rbp, rdx
mov qword [rsp + 0x50], rdx
mov r15d, edi
mov qword [rsp + 0x60], r8
test rcx, rcx
je 0x1800138ac
lea rax, [rsp + 0x68]
test rax, rax
je 0x1800138ac
lea r13, [rcx + 0x7f]
jmp 0x1800138b1
mov r13, qword [rsp + 0x68]
mov qword [rsp + 0x20b8], rsi
test rcx, rcx
je 0x1800138dd
lea rax, [rsp + 0x68]
test rax, rax
je 0x1800138dd
mov eax, dword [rcx + 0x87]
mov rsi, qword [rcx + rax*8 + 0x8b]
mov qword [rsp + 0x48], rsi
jmp 0x1800138e7
mov rsi, qword [rsp + 0x68]
mov qword [rsp + 0x48], rsi
mov rdx, qword [rdx + 0x10]
test rcx, rcx
je 0x180013912
mov rax, qword [rcx + 0x20]
cmp rax, rdx
jbe 0x180013912
mov qword [rcx + 0x18], rax
sub rax, rdx
mov qword [rcx + 0x28], rdx
cmp rax, 0xffffffffffffffff
jbe 0x180013912
lea rax, [rdx - 1]
mov qword [rcx + 0x18], rax
cmp qword [r8], 0xffffffffffffffff
je 0x18001391e
cmp qword [r8 + 0x24], rdi
je 0x180013926
bt dword [r8 + 0x18], 0xe
jae 0x180013942
lea rdx, str.NTFS_RecoverFile:_File_is_crypted._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000d
xor eax, eax
jmp 0x1800141e8
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, r10
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20a8], r14
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x180013999
lea rdx, str.NTFS_RecoverFile:_Unable_to_create_recover_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000c
xor eax, eax
jmp 0x1800141e0
mov edx, dword [rsi + 4]
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
mov qword [rsp + 0x20b0], r12
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
jne 0x1800139dd
lea rdx, str.NTFS_RecoverFile:_Unable_to_allocate_memory_for_cluster_read._n
mov rcx, rbx
call fcn.180016b80
mov ecx, 0x20000008
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r15d, [r12 + 1]
mov rcx, qword [rsp + 0x60]
cmp qword [rcx], 0xffffffffffffffff
jne 0x180013ac1
mov rax, qword [rsp + 0x40]
mov qword [rax], rdi
mov rbp, qword [rsi + 0x24]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rdi + 8]
add rbp, qword [rcx + 0x1c]
test rsi, rsi
je 0x180013da6
nop
mov eax, dword [r13]
mov rcx, qword [rbx + 0x34]
mov edi, esi
cmp rsi, rax
mov r9, r12
mov rdx, rbp
cmova edi, eax
lea rax, [rsp + 0x58]
mov r8d, edi
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x180013a42
cmp dword [rsp + 0x58], edi
je 0x180013a5d
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000f
mov r15d, 1
lea r9, [rsp + 0x5c]
mov r8d, edi
mov rdx, r12
mov rcx, r14
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180013a99
lea rdx, str.NTFS_RecoverFile:_Error_writing_recover_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000e
mov r15d, 1
mov rcx, qword [rsp + 0x40]
mov eax, edi
add qword [rcx], rax
add rbp, rax
sub rsi, rax
jne 0x180013a10
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov rbp, rcx
jmp 0x180013dae
mov r13, rcx
cmp dword [rcx + 0x20], edi
jne 0x180013b0a
lea rdx, str.NTFS_RecoverFile:_File_data_is_resident._n
mov rcx, rbx
call fcn.180016b80
mov r8d, dword [r13 + 0x1c]
mov rdx, qword [r13 + 0x24]
lea r9, [rsp + 0x5c]
mov rcx, r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbp, qword [rsp + 0x40]
mov r11d, dword [r13 + 0x1c]
add qword [rbp], r11
mov rdi, qword [rsp + 0x50]
jmp 0x180013dae
lea rdx, str.NTFS_RecoverFile:_File_data_is_not_resident._n
mov rcx, rbx
mov rsi, rdi
call fcn.180016b80
mov edx, 0x28
xor ecx, ecx
lea r9d, [rdx - 0x24]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
je 0x180013d97
mov dword [rax + 0x1c], edi
mov qword [rax + 0x20], rdi
mov dword [rax + 0x18], edi
mov qword [rax], rdi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
mov rax, qword [rsp + 0x60]
mov rcx, r13
mov r8d, dword [rax + 0x20]
mov rdx, qword [rax + 0x24]
call fcn.180004ac0
mov rcx, qword [rsp + 0x60]
mov r11d, dword [rcx + 0x18]
and r11d, 4
test r11b, r11b
je 0x180013bc8
lea rdx, str.NTFS_RecoverFile:_File_is_compressed._n
mov rcx, rbx
call fcn.180016b80
mov rax, qword [rsp + 0x40]
mov r9, r14
mov r8, rbp
mov rdx, r13
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.1800132b0
mov r15d, edi
test eax, eax
mov rcx, r13
mov rdi, rbp
mov rbp, qword [rsp + 0x40]
sete r15b
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
lea rdx, [rsp + 0x78]
xor r8d, r8d
mov rcx, r13
call fcn.180004850
test eax, eax
je 0x180013d58
mov rbp, qword [rsp + 0x78]
test rbp, rbp
je 0x180013d3f
mov rdi, qword [rsp + 0x50]
cmp rsi, qword [rdi + 8]
jae 0x180013d83
mov rcx, qword [rbx + 0x24]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x180013d6f
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x48]
movabs rdx, 0xffffffff00000000
mov r8d, dword [rcx + 4]
sub rax, rsi
mov edi, r8d
test rdx, rax
jne 0x180013c39
cmp r8d, eax
cmova edi, eax
lea rax, [rsp + 0x88]
test rax, rax
je 0x180013d1a
mov rdx, r8
imul rdx, rbp
add rdx, qword [rcx + 0x24]
test r12, r12
je 0x180013cdd
mov rcx, qword [rbx + 0x34]
lea rax, [rsp + 0x58]
mov r9, r12
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x180013c86
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx + 4]
cmp dword [rsp + 0x58], eax
je 0x180013ca1
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000f
mov r15d, 1
lea r9, [rsp + 0x5c]
mov r8d, edi
mov rdx, r12
mov rcx, r14
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180013cdd
lea rdx, str.NTFS_RecoverFile:_Error_writing_recover_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000e
mov r15d, 1
mov rbp, qword [rsp + 0x40]
mov eax, edi
lea rdx, [rsp + 0x78]
add rsi, rax
xor r8d, r8d
mov rcx, r13
mov qword [rbp], rsi
call fcn.180004850
test eax, eax
jne 0x180013be0
mov rdi, qword [rsp + 0x50]
mov rcx, r13
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rdi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x40]
mov rcx, r13
mov dword [rbx], 0x20000013
mov r15d, 1
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rdi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x40]
mov rcx, r13
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rcx, r13
mov rdi, rbp
mov rbp, qword [rsp + 0x40]
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rbp, qword [rsp + 0x40]
mov rcx, r13
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rbp, qword [rsp + 0x40]
mov rcx, r13
call fcn.180004800
mov rsi, qword [rsp + 0x48]
jmp 0x180013dae
mov rsi, qword [rsp + 0x48]
mov rdi, rbp
mov rbp, qword [rsp + 0x40]
jmp 0x180013dae
mov rsi, qword [rsp + 0x48]
mov rbp, rax
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea r9, [rdi + 0x18]
lea r8, [rdi + 0x28]
lea rdx, [rdi + 0x20]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x60]
cmp qword [r12], 0xffffffffffffffff
mov rdi, qword [r12 + 0x2c]
mov qword [rsp + 0x70], rdi
je 0x1800141cd
mov r13d, 0x3a
xor r14d, r14d
test rdi, rdi
je 0x1800141cd
mov r8, qword [rsp + 0x80]
lea rax, [rsp + 0x90]
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x1000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r11d, eax
lea eax, [r11 - 1]
lea rcx, [rsp + r11*2 + 0x90]
mov word [rsp + rax*2 + 0x90], r13w
mov rdx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x90]
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x68], rax
cmp rax, 0xffffffffffffffff
je 0x1800141ab
mov edx, dword [rsi + 4]
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
jne 0x180013ecc
lea rdx, str.NTFS_RecoverFile:_Unable_to_allocate_memory_for_cluster_read._n
mov rcx, rbx
call fcn.180016b80
mov ecx, 0x20000008
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r15d, [r13 + 1]
cmp dword [rdi + 0x14], r14d
jne 0x180013f0b
lea rdx, str.NTFS_RecoverFile:_Stream_data_is_resident._n
mov rcx, rbx
call fcn.180016b80
mov r8d, dword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [rdi + 0x10]
mov qword [rbp], r11
jmp 0x180014187
lea rdx, str.NTFS_RecoverFile:_Stream_data_is_not_resident._n
mov rcx, rbx
mov rbp, r14
call fcn.180016b80
mov edx, 0x28
xor ecx, ecx
lea r9d, [rdx - 0x24]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
je 0x18001417d
mov dword [rax + 0x1c], r14d
mov qword [rax + 0x20], r14
mov dword [rax + 0x18], r14d
mov qword [rax], r14
mov qword [rax + 8], r14
mov qword [rax + 0x10], r14
mov r8d, dword [rdi + 0x14]
mov rdx, qword [rdi + 0x18]
mov rcx, rax
call fcn.180004ac0
mov rcx, qword [rsp + 0x60]
mov r11d, dword [rcx + 0x18]
and r11d, 4
test r11b, r11b
je 0x180013fb5
lea rdx, str.NTFS_RecoverFile:_Stream_is_compressed._n
mov rcx, rbx
call fcn.180016b80
mov rbp, qword [rsp + 0x40]
mov r9, qword [rsp + 0x68]
mov r8, qword [rsp + 0x50]
mov rdx, r12
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call fcn.1800132b0
mov r15d, r14d
test eax, eax
sete r15b
jmp 0x18001414d
lea rdx, [rsp + 0x78]
xor r8d, r8d
mov rcx, r12
call fcn.180004850
test eax, eax
je 0x180014148
nop dword [rax]
mov rsi, qword [rsp + 0x78]
test rsi, rsi
je 0x180014137
mov rdi, qword [rsp + 0x50]
cmp rbp, qword [rdi + 8]
jae 0x180014126
mov rcx, qword [rbx + 0x24]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x180014115
mov rcx, qword [rsp + 0x48]
mov rax, qword [rdi + 8]
mov r8d, dword [rcx + 4]
sub rax, rbp
movabs rcx, 0xffffffff00000000
mov edi, r8d
test rcx, rax
jne 0x180014029
cmp r8d, eax
cmova edi, eax
lea rax, [rsp + 0x88]
test rax, rax
je 0x1800140f8
mov rdx, r8
imul rdx, rsi
mov rsi, qword [rsp + 0x48]
add rdx, qword [rsi + 0x24]
test r13, r13
je 0x1800140c7
mov rcx, qword [rbx + 0x34]
lea rax, [rsp + 0x58]
mov r9, r13
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x180014072
mov eax, dword [rsi + 4]
cmp dword [rsp + 0x58], eax
je 0x18001408d
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000f
mov r15d, 1
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x5c]
mov r8d, edi
mov rdx, r13
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800140c7
lea rdx, str.NTFS_RecoverFile:_Error_writing_recover_stream._n
mov rcx, rbx
call fcn.180016b80
mov dword [rbx], 0x2000000e
mov r15d, 1
mov eax, edi
lea rdx, [rsp + 0x78]
xor r8d, r8d
add rbp, rax
mov rax, qword [rsp + 0x40]
mov rcx, r12
mov qword [rax], rbp
call fcn.180004850
test eax, eax
jne 0x180013fd0
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x40]
jmp 0x18001414d
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x40]
mov dword [rbx], 0x20000013
mov r15d, 1
jmp 0x18001414d
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x40]
jmp 0x18001414d
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x40]
jmp 0x18001414d
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x40]
jmp 0x18001414d
mov rbp, qword [rsp + 0x40]
mov rcx, qword [r12 + 0x20]
test rcx, rcx
je 0x180014165
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r12, qword [rsp + 0x60]
jmp 0x180014187
mov rbp, qword [rsp + 0x40]
mov r12, qword [rsp + 0x60]
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13d, 0x3a
jmp 0x1800141ba
lea rdx, str.Not_all_of_file_streams_could_be_restored.
mov rcx, rbx
call fcn.180016b80
cmp qword [r12], 0xffffffffffffffff
mov rdi, qword [rdi]
mov qword [rsp + 0x70], rdi
jne 0x180013e00
mov r12, qword [rsp + 0x20b0]
test r15d, r15d
mov eax, 0
sete al
mov r14, qword [rsp + 0x20a8]
mov rsi, qword [rsp + 0x20b8]
mov rcx, qword [rsp + 0x2090]
xor rcx, rsp
call fcn.18002d590
add rsp, 0x20c0
pop r15
pop r13
pop rdi
pop rbp
pop rbx
ret