Function at 0x18001b560
Capabilities:
Allocate or change rwx memory
Delete file
Get disk size
Get file attributes
Get file size
Move file
Set file attributes
Write file on windows

Disassembly:
push rbx
push rbp
push rdi
mov eax, 0x80a0
call fcn.18003c6a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x8090], rax
mov dword [rsp + 0x4c], r8d
mov rdi, rdx
mov qword [rsp + 0x80], rdx
mov r8, rdx
lea rdx, str.Undelete_WipeFile:_Wiping_file__d._n
mov rbp, rcx
mov qword [rsp + 0x68], rcx
mov ebx, 1
call fcn.180016b80
mov rcx, qword [rbp + 0x24]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rbp + 0x2c]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rax, qword [rbp + 0x44]
test rax, rax
je 0x18001bebe
cmp rdi, qword [rbp + 0x210]
jae 0x18001bebe
imul rdi, rdi, 0x93
lea rdx, [rbp + 0x2d9]
mov qword [rsp + 0x80d8], rsi
add rdi, rax
xor esi, esi
mov qword [rsp + 0x70], rdx
mov qword [rdx], rsi
mov qword [rsp + 0x50], rdi
test byte [rdi + 0x78], bl
jne 0x18001b8ea
movzx ecx, word [rdi + 0x85]
lea r9, [0x180000000]
lea r8, [rsp + 0x80]
mov rax, qword [r9 + 0x41f90]
and ecx, 0xfff
mov qword [rsp + 0x30], rsi
mov qword [r8], rax
mov rax, qword [r9 + 0x41f98]
imul rcx, rcx, 0x126
add rcx, qword [rbp + 0x2b5]
mov qword [r8 + 8], rax
mov eax, dword [r9 + 0x3e7c0]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x68], rcx
mov dword [rsp + 0x28], esi
mov dword [r8], eax
movzx eax, word [r9 + 0x3e7c4]
mov dword [rsp + 0x20], 3
mov word [r8 + 4], ax
movzx eax, byte [r9 + 0x3e7c6]
mov qword [rdx], rsi
mov byte [r8 + 6], al
movzx eax, byte [rcx + 0x24]
lea r8d, [rbx + 2]
lea rcx, [rsp + 0x78]
xor r9d, r9d
mov edx, 0xc0000000
mov byte [rsp + 0x80], al
mov byte [rsp + 0x7c], al
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
je 0x18001b8b7
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x80]
xor r9d, r9d
mov r8d, ebx
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x84000002
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18001b8b7
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x4c]
lea rcx, [rsp + 0x80]
xor r9d, r9d
mov word [rsp + 0x44], si
mov byte [rsp + 0x83], sil
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
mov eax, dword [rsp + 0x4c]
imul eax, dword [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000
mov rcx, rdi
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea r9d, [rbx + 1]
lea r8, [rsp + 0x44]
mov edx, 0x9c040
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rdx, qword [rsp + 0x68]
mov rax, qword [rdx + 0xc]
mov r8, qword [rsp + 0x50]
mov qword [rbp + 0x34], rax
movzx ecx, word [r8 + 0x85]
shr ecx, 0xc
and ecx, 7
je 0x18001b877
sub ecx, ebx
je 0x18001b818
cmp ecx, ebx
jne 0x18001b8ae
mov rax, qword [rdx + 0xc]
mov ecx, dword [r8 + 0x87]
test rax, rax
je 0x18001b7d4
cmp ecx, dword [rax + 0x83]
jae 0x18001b7d4
mov dword [rax + 0x87], ecx
lea rdx, str.Undelete_WipeFile:_Calling_NTFS_Wipe_to_recover_file._n
mov rcx, rbp
call fcn.180016b80
mov eax, dword [rsp + 0x40]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
lea r11, [rbp + 0x2d9]
mov r9, rdi
mov qword [rsp + 0x28], r11
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.180014210
mov ebx, esi
test eax, eax
sete bl
jmp 0x18001b8ae
mov rax, qword [rdx + 0xc]
mov ecx, dword [r8 + 0x87]
test rax, rax
je 0x18001b836
cmp ecx, dword [rax + 0x83]
jae 0x18001b836
mov dword [rax + 0x87], ecx
lea rdx, str.Undelete_WipeFile:_Calling_FAT_Wipe_to_recover_file._n
mov rcx, rbp
call fcn.180016b80
mov eax, dword [rsp + 0x40]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
lea r11, [rbp + 0x2d9]
mov r9, rdi
mov qword [rsp + 0x28], r11
mov rcx, rbp
mov dword [rsp + 0x20], eax
call fcn.180009360
mov ebx, esi
test eax, eax
sete bl
jmp 0x18001b8ae
lea rdx, str.Undelete_WipeFile:_Calling_Unformated_WipeFile_to_recover_file._n
mov rcx, rbp
call fcn.180016b80
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
lea r11, [rbp + 0x2d9]
mov r9, rdi
mov rcx, rbp
mov qword [rsp + 0x20], r11
call fcn.18002d280
mov ebx, esi
test eax, eax
sete bl
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x70]
test ebx, ebx
mov qword [rax], rsi
sete sil
mov eax, esi
mov rsi, qword [rsp + 0x80d8]
mov rcx, qword [rsp + 0x8090]
xor rcx, rsp
call fcn.18002d590
add rsp, 0x80a0
pop rdi
pop rbp
pop rbx
ret
mov qword [rdx], rsi
mov ecx, dword [rdi]
lea rdx, [rsp + 0x4090]
mov r8, rbp
mov dword [rsp + 0x44], esi
call fcn.18001b000
lea rcx, [rsp + 0x4090]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rdi + 0x30]
movsxd rcx, eax
lea rcx, [rsp + rcx*2 + 0x4090]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x4090]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, ebx
test al, al
je 0x18001b9ed
mov rdx, qword [rbp + 0x210]
mov rcx, qword [rbp + 0x44]
lea r9, [rsp + 0x40]
imul rdx, rdx, 0x93
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
or byte [rdi + 0x7c], 2
mov rdx, qword [rbp + 0x210]
imul rdx, rdx, 0x93
mov rcx, qword [rbp + 0x44]
lea r9, [rsp + 0x40]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rcx, [rsp + 0x4090]
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x18001b8c7
mov rdx, qword [rbp + 0x210]
mov rcx, qword [rbp + 0x44]
lea r9, [rsp + 0x40]
imul rdx, rdx, 0x93
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
and byte [rdi + 0x7c], 0xfd
mov rdx, qword [rbp + 0x210]
imul rdx, rdx, 0x93
mov rcx, qword [rbp + 0x44]
lea r9, [rsp + 0x40]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [rsp + 0x4c], esi
mov r8d, 2
mov qword [rsp + 0x30], rsi
cmovne r8d, esi
lea rcx, [rsp + 0x4090]
mov edx, 0x40000000
or r8d, ebx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x18001beae
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x7c]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
or edi, 0xffffffff
mov dword [rsp + 0x78], eax
cmp eax, edi
jne 0x18001ba6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18001bbd2
mov rax, qword [rsp + 0x50]
test byte [rax + 0x7c], 0x10
jne 0x18001bbd2
xor ecx, ecx
mov edx, 0x40000
mov r8d, 0x1000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x18001bbb3
mov dword [rsp + 0x44], ebx
mov rbx, rsi
nop word [rax + rax]
mov rcx, qword [rsp + 0x78]
mov eax, dword [rsp + 0x78]
mov edx, 0x40000
cmp rcx, rdx
mov dword [rsp + 0x48], esi
mov edi, esi
cmovg eax, edx
mov dword [rsp + 0x40], eax
cmp dword [rbp + 0x298], esi
jbe 0x18001bb6e
nop word [rax + rax]
mov rcx, qword [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [rsp + 0x44]
mov r9d, dword [rsp + 0x40]
mov r8, qword [rsp + 0x58]
test eax, eax
mov edx, edi
cmove ecx, esi
mov dword [rsp + 0x44], ecx
mov ecx, dword [rbp + 0x294]
shr ecx, 2
call fcn.180017600
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x24]
test eax, eax
mov eax, dword [rsp + 0x44]
cmove eax, esi
xor edx, edx
mov dword [rsp + 0x44], eax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x18001bb65
inc edi
cmp edi, dword [rbp + 0x298]
jb 0x18001bae0
mov rcx, qword [rsp + 0x78]
mov eax, dword [rsp + 0x40]
add rbx, rax
cmp rbx, rcx
mov qword [rbp + 0x2d9], rbx
jge 0x18001bb96
mov rcx, qword [rbp + 0x24]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x18001bab0
mov rcx, qword [rsp + 0x78]
mov qword [rbp + 0x2d9], rcx
mov rcx, qword [rsp + 0x58]
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
or edi, 0xffffffff
mov rbx, qword [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x24]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x18001beae
mov dword [rsp + 0x44], 0xa
nop dword [rax]
lea rdx, [rsp + 0x4090]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rbx, eax
mov edx, ebx
lea rax, [rsp + rbx*2 + 0x90]
mov ecx, ebx
sub rax, 2
add ebx, edi
test ecx, ecx
je 0x18001bc43
cmp word [rax], 0x5c
jne 0x18001bc31
mov r8d, dword [0x18004c310]
inc ebx
mov ebp, 0x2e
movsxd rax, ebx
sub edx, ebx
mov dword [rsp + 0x40], ebx
lea rdi, [rsp + rax*2 + 0x90]
mov dword [rsp + 0x48], edx
mov ecx, 8
movabs rbx, 0x200000005
nop word [rax + rax]
cmp edx, 8
mov eax, edx
cmovb eax, ecx
cmp esi, eax
jae 0x18001bd0a
cmp bp, word [rdi]
je 0x18001bcff
test r8d, r8d
jne 0x18001bc9f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov r8d, r8d
mov rax, rbx
imul r8, r8, 0x10ff5
mul r8
mov rcx, r8
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 0x1e
imul rcx, rcx, 0x7fffffff
sub r8, rcx
mov eax, r8d
mov dword [0x18004c310], r8d
shr eax, 8
movzx ecx, al
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x1a
sub ecx, edx
mov edx, dword [rsp + 0x48]
add cx, 0x41
mov word [rdi], cx
mov ecx, 8
inc esi
add rdi, 2
jmp 0x18001bc80
mov ebx, dword [rsp + 0x40]
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x4090]
lea eax, [rsi + rbx]
xor esi, esi
mov word [rsp + rax*2 + 0x90], si
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov rbp, qword [rsp + 0x68]
test eax, eax
jne 0x18001be24
or edi, 0xffffffff
add dword [rsp + 0x44], edi
jne 0x18001bc00
mov edi, dword [rsp + 0x44]
lea rcx, [rsp + 0x4090]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, eax
mov dword [rsp + 0x44], eax
test ebx, ebx
je 0x18001beae
mov rdx, qword [rbp + 0x210]
mov rcx, qword [rbp + 0x44]
lea r9, [rsp + 0x40]
imul rdx, rdx, 0x93
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rdx, qword [rbp + 0x220]
mov rcx, qword [rbp + 0x3c]
lea r9, [rsp + 0x40]
add rdx, rdx
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r9, qword [rsp + 0x50]
and byte [r9 + 0x78], 0xfe
test byte [r9 + 0x7c], 0x10
je 0x18001bddc
mov r8d, dword [rsp + 0x4c]
mov rdx, qword [rsp + 0x80]
mov rcx, rbp
call sym.PRDLL.dll_Undelete_WipeFile
mov r9, qword [rsp + 0x50]
mov dword [rsp + 0x44], eax
test edi, edi
je 0x18001be6c
mov ecx, esi
mov rdx, rsi
cmp si, word [rsp + 0x90]
je 0x18001be49
lea r8, [rsp + 0x90]
mov r10d, 0x5c
or eax, 0xffffffff
cmp r10w, word [r8]
cmove eax, ecx
inc rdx
inc ecx
cmp si, word [rsp + rdx*2 + 0x90]
lea r8, [rsp + rdx*2 + 0x90]
jne 0x18001be04
jmp 0x18001be4e
mov edi, dword [rsp + 0x44]
test edi, edi
je 0x18001bd4f
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, eax
mov dword [rsp + 0x44], eax
jmp 0x18001bd63
mov eax, 0xffffffff
and byte [r9 + 0x78], 0xc1
lea rdx, [rsp + rax*2 + 0x92]
lea r8, [r9 + 0x30]
lea rcx, [rbp + 0x3c]
mov qword [r9 + 8], rsi
call fcn.180016f30
mov rdx, qword [rbp + 0x220]
mov rcx, qword [rbp + 0x3c]
lea r9, [rsp + 0x40]
add rdx, rdx
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rdx, qword [rbp + 0x210]
mov rcx, qword [rbp + 0x44]
imul rdx, rdx, 0x93
lea r9, [rsp + 0x40]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rsp + 0x44]
mov qword [rbp + 0x2d9], rsi
jmp 0x18001b8c7
lea rdx, str.Undelete_WipeFile:_Files_or_strings_or_both_storages_are_NULL._n
mov rcx, rbp
call fcn.180016b80
mov dword [rbp], 0x2000000b
xor eax, eax
jmp 0x18001b8cf