Function at 0x180015730
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
push r15
mov eax, 0x20c8
call fcn.18003c6a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x20a0], rax
mov r15, qword [rsp + 0x2120]
xor esi, esi
mov rdi, rcx
mov rcx, qword [rcx + 0x34]
mov qword [rsp + 0x88], r8
mov r8, qword [rdx + 0x8b]
mov rbp, r9
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x68], rdx
mov r13, rsi
mov dword [rsp + 0x40], esi
mov qword [rsp + 0x50], r8
test rcx, rcx
je 0x1800157a7
lea rax, [rsp + 0x60]
test rax, rax
je 0x1800157a7
lea r14, [rcx + 0x7f]
jmp 0x1800157ac
mov r14, qword [rsp + 0x60]
mov qword [rsp + 0x20c0], rbx
test rcx, rcx
je 0x1800157d8
lea rax, [rsp + 0x60]
test rax, rax
je 0x1800157d8
mov eax, dword [rcx + 0x87]
mov rbx, qword [rcx + rax*8 + 0x8b]
mov qword [rsp + 0x60], rbx
jmp 0x1800157e2
mov rbx, qword [rsp + 0x60]
mov qword [rsp + 0x60], rbx
mov rdx, qword [rdx + 0x10]
test rcx, rcx
je 0x18001580d
mov rax, qword [rcx + 0x20]
cmp rax, rdx
jbe 0x18001580d
mov qword [rcx + 0x18], rax
sub rax, rdx
mov qword [rcx + 0x28], rdx
cmp rax, 0xffffffffffffffff
jbe 0x18001580d
lea rax, [rdx - 1]
mov qword [rcx + 0x18], rax
cmp qword [r8], 0xffffffffffffffff
je 0x180015819
cmp qword [r8 + 0x24], rsi
je 0x180015821
bt dword [r8 + 0x18], 0xe
jae 0x18001583d
lea rdx, str.NTFS_RecoverFile:_File_is_crypted._n
mov rcx, rdi
call fcn.180016b80
mov dword [rdi], 0x2000000d
xor eax, eax
jmp 0x180015f46
mov edx, dword [rbx + 4]
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
mov qword [rsp + 0x20b8], r12
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
jne 0x180015884
lea rdx, str.NTFS_RecoverFile:_Unable_to_allocate_memory_for_cluster_read._n
mov rcx, rdi
call fcn.180016b80
mov ecx, 0x20000008
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsp + 0x40], 1
mov rax, qword [rsp + 0x50]
cmp qword [rax], 0xffffffffffffffff
jne 0x180015931
mov r8, qword [rsp + 0x68]
mov qword [rbp], rsi
mov rbp, qword [rbx + 0x24]
mov rsi, qword [r8 + 8]
add rbp, qword [rax + 0x1c]
test rsi, rsi
je 0x180015b5d
mov eax, dword [r14]
mov rcx, qword [rdi + 0x34]
mov ebx, esi
cmp rsi, rax
mov r9, r12
mov rdx, rbp
cmova ebx, eax
lea rax, [rsp + 0x58]
mov r8d, ebx
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x1800158e2
cmp dword [rsp + 0x58], ebx
je 0x1800158ff
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rdi
call fcn.180016b80
mov dword [rdi], 0x2000000f
mov dword [rsp + 0x40], 1
lea rcx, [r15 + r13]
mov r8, rbx
mov rdx, r12
call fcn.18002dae0
mov rax, qword [rsp + 0x48]
add r13, rbx
add qword [rax], rbx
add rbp, rbx
sub rsi, rbx
jne 0x1800158b1
mov rsi, qword [rsp + 0x50]
xor r14d, r14d
mov rbp, rax
jmp 0x180015b74
mov rsi, rax
cmp dword [rax + 0x20], r13d
jne 0x180015975
lea rdx, str.NTFS_RecoverFile:_File_data_is_resident._n
mov rcx, rdi
call fcn.180016b80
mov r8d, dword [rsi + 0x1c]
mov rdx, qword [rsi + 0x24]
lea r9, [rsp + 0x70]
xor r14d, r14d
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [rsi + 0x1c]
add qword [rbp], r11
jmp 0x180015b74
lea rdx, str.NTFS_RecoverFile:_File_data_is_not_resident._n
xor r14d, r14d
mov rcx, rdi
mov rsi, r14
call fcn.180016b80
lea edx, [r14 + 0x28]
lea r9d, [r14 + 4]
xor ecx, ecx
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x180015b6a
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 rax, qword [rsp + 0x50]
mov rcx, rbp
mov r8d, dword [rax + 0x20]
mov rdx, qword [rax + 0x24]
call fcn.180004ac0
mov rax, qword [rsp + 0x50]
mov r11d, dword [rax + 0x18]
and r11d, 4
test r11b, r11b
je 0x180015a2a
lea rdx, str.NTFS_RecoverFile:_File_is_compressed._n
mov rcx, rdi
call fcn.180016b80
mov r11, qword [rsp + 0x48]
mov r8, qword [rsp + 0x68]
or r9, 0xffffffffffffffff
mov rdx, rbp
mov rcx, rdi
mov qword [rsp + 0x20], r11
call fcn.1800132b0
test eax, eax
sete r14b
mov dword [rsp + 0x40], r14d
xor r14d, r14d
jmp 0x180015b49
lea rdx, [rsp + 0x80]
xor r8d, r8d
mov rcx, rbp
call fcn.180004850
test eax, eax
je 0x180015b49
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x180015b46
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
cmp rsi, rax
jae 0x180015b41
mov r8d, dword [rbx + 4]
sub rax, rsi
movabs rdx, 0xffffffff00000000
mov rbx, r8
test rdx, rax
jne 0x180015a86
cmp ebx, eax
cmova ebx, eax
lea rax, [rsp + 0x90]
test rax, rax
je 0x180015b29
mov r14, qword [rsp + 0x60]
mov rdx, r8
imul rdx, rcx
add rdx, qword [r14 + 0x24]
test r12, r12
je 0x180015aed
mov rcx, qword [rdi + 0x34]
lea rax, [rsp + 0x58]
mov r9, r12
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x180015ad0
mov eax, dword [r14 + 4]
cmp dword [rsp + 0x58], eax
je 0x180015aed
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rdi
call fcn.180016b80
mov dword [rdi], 0x2000000f
mov dword [rsp + 0x40], 1
lea rcx, [r15 + r13]
mov r8, rbx
mov rdx, r12
call fcn.18002dae0
mov rax, qword [rsp + 0x48]
lea rdx, [rsp + 0x80]
add rsi, rbx
xor r8d, r8d
mov rcx, rbp
mov qword [rax], rsi
add r13, rbx
call fcn.180004850
test eax, eax
je 0x180015b3c
mov rbx, r14
jmp 0x180015a45
mov dword [rdi], 0x20000013
mov dword [rsp + 0x40], 1
xor r14d, r14d
jmp 0x180015b49
xor r14d, r14d
jmp 0x180015b49
xor r14d, r14d
jmp 0x180015b49
xor r14d, r14d
mov rcx, rbp
call fcn.180004800
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
jmp 0x180015b74
mov rbp, qword [rsp + 0x48]
xor r14d, r14d
mov rsi, rax
jmp 0x180015b74
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
cmp qword [rsi], 0xffffffffffffffff
mov r15, qword [rsi + 0x2c]
je 0x180015f2e
mov ebx, 0x3a
nop dword [rax + rax]
test r15, r15
je 0x180015f2e
mov r8, qword [rsp + 0x88]
lea rax, [rsp + 0xa0]
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 + 0xa0]
mov word [rsp + rax*2 + 0xa0], bx
mov rdx, qword [r15 + 8]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0xa0]
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 rbx, rax
mov qword [rsp + 0x78], rax
cmp rax, 0xffffffffffffffff
je 0x180015f0d
mov r13, qword [rsp + 0x60]
xor ecx, ecx
mov r8d, 0x1000
mov edx, dword [r13 + 4]
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
jne 0x180015c78
lea rdx, str.NTFS_RecoverFile:_Unable_to_allocate_memory_for_cluster_read._n
mov rcx, rdi
call fcn.180016b80
mov ecx, 0x20000008
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsp + 0x40], 1
cmp dword [r15 + 0x14], 0
jne 0x180015cb6
lea rdx, str.NTFS_RecoverFile:_Stream_data_is_resident._n
mov rcx, rdi
call fcn.180016b80
mov r8d, dword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
lea r9, [rsp + 0x70]
mov rcx, rbx
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [r15 + 0x10]
mov qword [rbp], r11
jmp 0x180015ef1
lea rdx, str.NTFS_RecoverFile:_Stream_data_is_not_resident._n
mov rcx, rdi
mov rsi, 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 rbp, rax
test rax, rax
je 0x180015ee7
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 [r15 + 0x14]
mov rdx, qword [r15 + 0x18]
mov rcx, rax
call fcn.180004ac0
mov rax, qword [rsp + 0x50]
mov r11d, dword [rax + 0x18]
and r11d, 4
test r11b, r11b
je 0x180015d63
lea rdx, str.NTFS_RecoverFile:_Stream_is_compressed._n
mov rcx, rdi
call fcn.180016b80
mov rax, qword [rsp + 0x48]
mov r8, qword [rsp + 0x68]
mov r9, rbx
mov rdx, rbp
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.1800132b0
test eax, eax
sete r14b
mov dword [rsp + 0x40], r14d
xor r14d, r14d
jmp 0x180015eb3
lea rdx, [rsp + 0x80]
xor r8d, r8d
mov rcx, rbp
call fcn.180004850
test eax, eax
je 0x180015eb3
nop
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x180015eae
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
cmp rsi, rax
jae 0x180015ea7
mov r8d, dword [r13 + 4]
sub rax, rsi
movabs rdx, 0xffffffff00000000
mov ebx, r8d
test rdx, rax
jne 0x180015dc1
cmp ebx, eax
cmova ebx, eax
lea rax, [rsp + 0x90]
test rax, rax
je 0x180015e92
mov rdx, r8
imul rdx, rcx
add rdx, qword [r13 + 0x24]
test r12, r12
je 0x180015e63
mov rcx, qword [rdi + 0x34]
lea rax, [rsp + 0x58]
mov r9, r12
mov qword [rsp + 0x20], rax
call fcn.180002c60
test eax, eax
je 0x180015e0a
mov eax, dword [r13 + 4]
cmp dword [rsp + 0x58], eax
je 0x180015e27
lea rdx, str.NTFS_RecoverFile:_Error_reading_deleted_file._n
mov rcx, rdi
call fcn.180016b80
mov dword [rdi], 0x2000000f
mov dword [rsp + 0x40], 1
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x70]
mov r8d, ebx
mov rdx, r12
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180015e63
lea rdx, str.NTFS_RecoverFile:_Error_writing_recover_stream._n
mov rcx, rdi
call fcn.180016b80
mov dword [rdi], 0x2000000e
mov dword [rsp + 0x40], 1
mov eax, ebx
lea rdx, [rsp + 0x80]
xor r8d, r8d
add rsi, rax
mov rax, qword [rsp + 0x48]
mov rcx, rbp
mov qword [rax], rsi
call fcn.180004850
test eax, eax
jne 0x180015d80
mov rbx, qword [rsp + 0x78]
jmp 0x180015eb3
mov rbx, qword [rsp + 0x78]
mov dword [rdi], 0x20000013
mov dword [rsp + 0x40], 1
jmp 0x180015eb3
mov rbx, qword [rsp + 0x78]
jmp 0x180015eb3
mov rbx, qword [rsp + 0x78]
mov rcx, qword [rbp + 0x20]
test rcx, rcx
je 0x180015eca
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
jmp 0x180015ef1
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180015f1c
lea rdx, str.Not_all_of_file_streams_could_be_restored.
mov rcx, rdi
call fcn.180016b80
cmp qword [rsi], 0xffffffffffffffff
mov r15, qword [r15]
mov ebx, 0x3a
jne 0x180015ba0
cmp dword [rsp + 0x40], 0
mov r12, qword [rsp + 0x20b8]
mov esi, 0
sete sil
mov eax, esi
mov rbx, qword [rsp + 0x20c0]
mov rcx, qword [rsp + 0x20a0]
xor rcx, rsp
call fcn.18002d590
add rsp, 0x20c8
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret