Function at 0x140057e8c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x68
mov r15, rdx
mov rdi, rcx
or qword [rbp - 0x28], 0xffffffffffffffff
xor ebx, ebx
mov qword [rbp - 0x20], rbx
xor esi, esi
and dword [rbp + 0x58], esi
mov r13d, 0x100000
and dword [rbp + 0x60], esi
lea r8, str.CVdsRawDiskLun::CleanDiskThread__
lea edx, [rbx + 0x5e]
lea rcx, [rbp - 0x18]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::constructor_unsigned_long_int__char_const____ptr64____ptr64]
nop dword [rax + rax]
nop
lea r8, [rbp - 0x28]
mov edx, 0xc0000000
mov rcx, qword [rdi + 0xd8]
call qword [sym.imp.vdsutil.dll_OpenDevice]
nop dword [rax + rax]
mov edi, eax
test eax, eax
je 0x140057f36
mov r9d, eax
lea r8, str.CRawDiskLun::Clean__1__error_ld
xor edx, edx
lea ecx, [rbx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
test edi, edi
jle 0x140058189
movzx esi, di
or esi, 0x80070000
jmp 0x140058193
mov r14d, 0x80070000
test rbx, rbx
jne 0x140057fad
cmp r13d, 0x200
jb 0x140057f88
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
mov r8d, r13d
lea edx, [rbx + 8]
call qword [sym.imp.vdsutil.dll_VdsHeapAlloc]
nop dword [rax + rax]
mov rbx, rax
mov qword [rbp - 0x20], rax
test rax, rax
sete al
mov ecx, r13d
shr ecx, 1
test al, al
cmove ecx, r13d
mov r13d, ecx
jmp 0x140057f36
mov esi, 0x8007000e
mov r9d, esi
lea r8, str.CRawDiskLun::Clean__2__hr_lX
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
jmp 0x14005811f
xor edx, edx
mov eax, 0x100000
div r13d
mov r15d, eax
mov r12d, eax
mov eax, 1
xor edi, edi
test r12d, r12d
je 0x14005806e
test eax, eax
je 0x14005801e
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x58]
mov r8d, r13d
mov rdx, rbx
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
je 0x140058014
mov eax, dword [rbp + 0x58]
add rdi, rax
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointerEx]
nop dword [rax + rax]
add r12d, 0xffffffff
jne 0x140057fcd
test eax, eax
jne 0x14005806e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
lea eax, [r15 - 1]
mov r9d, esi
xor edx, edx
lea ecx, [rdx + 0x5e]
cmp r12d, eax
lea r8, str.CRawDiskLun::Clean__3__error_ld
je 0x14005804b
lea r8, str.CRawDiskLun::Clean__4__error_ld
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
mov r15, qword [rbp + 0x50]
test esi, esi
jle 0x14005811f
movzx esi, si
or esi, r14d
jmp 0x14005811f
mov rcx, qword [rbp + 0x48]
mov rax, qword [rcx + 0x100]
cmp rax, qword [0x140099ff0]
jne 0x140058096
mov rax, qword [rcx + 0x108]
cmp rax, qword [0x140099ff8]
je 0x14005811b
mov rdx, qword [rcx + 0xa0]
sub rdx, 0x100000
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointerEx]
nop dword [rax + rax]
test eax, eax
je 0x1400580f2
mov eax, 1
test r15d, r15d
je 0x140058119
test eax, eax
je 0x1400580f2
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x58]
mov r8d, r13d
mov rdx, rbx
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
nop dword [rax + rax]
add r15d, 0xffffffff
jne 0x1400580c8
cmp eax, 1
je 0x140058119
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
mov r9d, eax
lea r8, str.CRawDiskLun::CleanDiskThread__5__error_ld
xor edx, edx
lea ecx, [rdx + 0x5e]
jmp 0x14005804b
xor esi, esi
mov r15, qword [rbp + 0x50]
and qword [rsp + 0x38], 0
lea rax, [rbp + 0x60]
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x70140
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_core_io_l1_1_0.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
jne 0x140058193
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov r9d, eax
lea r8, str.CRawDiskLun::CleanDiskThread__6___ld
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
test esi, esi
jne 0x140058193
test edi, edi
jg 0x14005818d
mov esi, edi
jmp 0x140058193
movzx esi, di
or esi, r14d
mov r8d, esi
sar r8d, 0x1f
and r8d, 0xffffff9c
add r8d, 0x64
mov edx, esi
mov rcx, qword [r15 + 8]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsAsyncObjectBase::SetCompletionStatus_long_int__unsigned_long_int____ptr64]
nop dword [rax + rax]
mov rcx, qword [r15 + 8]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsAsyncObjectBase::Signal_void____ptr64]
nop dword [rax + rax]
mov rcx, qword [r15 + 8]
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x14006eaa8]
nop
lea rcx, [rbp - 0x18]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::destructor_void____ptr64]
nop dword [rax + rax]
nop
test rbx, rbx
je 0x14005821b
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.vdsutil.dll_VdsHeapFree]
nop dword [rax + rax]
and qword [rbp - 0x20], 0
mov rcx, qword [rbp - 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14005823a
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
or qword [rbp - 0x28], 0xffffffffffffffff
xor eax, eax
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret