Function at 0x1400300d4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov r13, rdx
xor eax, eax
mov qword [rsp + 0x30], rax
mov dword [rbp + 0xb8], eax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov dword [rbp + 0xc8], eax
or qword [rsp + 0x38], 0xffffffffffffffff
mov ebx, eax
mov qword [rsp + 0x48], rax
mov r12d, 0x100000
mov dword [rbp + 0xc0], eax
mov r14d, eax
mov qword [rsp + 0x50], rax
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__
lea edx, [rax + 0x5e]
lea rcx, [rbp - 0x80]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::constructor_unsigned_long_int__char_const____ptr64____ptr64]
nop
mov r15, qword [r13 + 0x48]
mov rsi, qword [r15 + 0x40]
mov rax, qword [rsi]
mov rdi, qword [rax]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
lea r8, [rsp + 0x30]
lea rdx, [0x1400587e8]
mov rcx, rsi
call rdi
mov edi, eax
test eax, eax
jns 0x1400301a5
mov r9d, eax
lea r8, str.CVdsDiskLun::PostCleanDiskHandler:_pAsync_QueryInterface_failed:__lX
xor edx, edx
lea ecx, [rbx + 0x5e]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
mov dword [r15 + 0x68], edi
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
jmp 0x1400306ec
cmp dword [r13 + 0x54], 0
je 0x1400301b8
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentThreadId]
mov dword [0x1400a13b0], eax
mov rsi, qword [rsp + 0x30]
mov rax, qword [rsi]
mov rdi, qword [rax + 0x20]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
lea r8, [rbp + 0x30]
lea rdx, [rbp + 0xb8]
mov rcx, rsi
call rdi
mov esi, eax
mov dword [rsp + 0x40], eax
mov eax, dword [rbp + 0xb8]
test esi, esi
js 0x140030696
test eax, eax
js 0x140030696
cmp dword [r13 + 0x50], 1
jne 0x140030212
mov dword [r15 + 0x6c], 0x64
and dword [r15 + 0x68], 0
jmp 0x1400306c3
cmp dword [r13 + 0x54], 0
je 0x140030351
call qword [sym.imp.vdsutil.dll_void___cdecl_GarbageCollectDriveLetters_void_]
lea rcx, [r13 + 0x18]
call qword [sym.imp.vdsutil.dll_long_int___cdecl_DeleteBcdObjects_struct__VDS_PARTITION_IDENTITY____ptr64_]
test eax, eax
jns 0x140030249
mov r9d, eax
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__2__status_lX
mov edx, 1
lea ecx, [rdx + 0x5d]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
lea rdi, [r13 + 8]
xor r9d, r9d
mov rdx, rdi
mov rcx, qword [r13 + 0x40]
call fcn.140011c7c
test eax, eax
je 0x140030287
mov dword [r15 + 0x68], 0x8000ffff
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
mov rdx, rdi
mov ecx, 9
call fcn.140012db0
xor r14d, r14d
jmp 0x1400306cd
lea rcx, [0x1400a0d50]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_EnterCriticalSection]
nop
mov r14, qword [rbp + 0xb0]
mov r14, qword [r14 + 0xd0]
test r14, r14
je 0x1400302c3
mov rax, qword [r14]
mov rdi, qword [rax + 8]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
mov rcx, r14
call rdi
lea rdi, [r13 + 8]
jmp 0x1400302dd
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__3__m_pUnk__NULL
mov edx, 1
lea ecx, [rdx + 0x5d]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
mov r14, qword [rsp + 0x50]
lea rcx, [0x1400a0d50]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_LeaveCriticalSection]
test r14, r14
je 0x140030351
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call fcn.140011508
mov esi, eax
mov dword [rsp + 0x40], eax
mov rax, qword [r14]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
mov rcx, r14
call rdi
test esi, esi
jns 0x140030351
mov r9d, esi
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__4___lX
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
mov dword [r15 + 0x68], 0x80042419
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
mov r14d, 0x80042419
jmp 0x1400306cd
cmp dword [r13 + 0x58], 1
jne 0x1400303c5
movups xmm0, xmmword [r13 + 8]
movdqu xmmword [rsp + 0x70], xmm0
lea r8, [rbp + 0xc8]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x70]
call fcn.140012004
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x1400303bb
mov dword [rbp + 0xb8], 0x80042405
mov r9d, esi
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__5___lX
xor edx, edx
lea ecx, [rax + 0x5e]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
mov eax, dword [rbp + 0xb8]
mov dword [r15 + 0x68], eax
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
jmp 0x14003027f
mov dword [rax + 0x148], 1
cmp dword [r13 + 0x54], 0
je 0x1400303ed
xor eax, eax
xchg dword [0x1400a13b0], eax
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [0x1400a0d78]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSemaphore]
mov rbx, qword [rsp + 0x48]
cmp dword [r13 + 0x58], 1
jne 0x140030629
lea r8, [rsp + 0x38]
mov edx, 0xc0000000
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.vdsutil.dll_unsigned_long_int___cdecl_OpenDevice_unsigned_short_int____ptr64__unsigned_long_int__void____ptr64____ptr64_]
test eax, eax
je 0x140030440
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__6___lX
movzx r9d, ax
or r9d, 0x80070000
test eax, eax
cmovle r9d, eax
mov dword [rbp + 0xb8], r9d
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
jmp 0x140030630
lea rdx, [rbp - 0x60]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.vdsutil.dll_unsigned_long_int___cdecl_GetPartitionInformation_void____ptr64__struct__PARTITION_INFORMATION_EX____ptr64_]
test eax, eax
je 0x14003045c
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__7___lX
jmp 0x140030418
cmp r12d, 0x200
jb 0x140030617
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov rcx, rax
mov r8d, r12d
mov edx, 8
call qword [sym.imp.vdsutil.dll_void____ptr64___cdecl_VdsHeapAlloc_void____ptr64__unsigned_long_int__unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x140030492
shr r12d, 1
jmp 0x14003045c
mov r14d, r12d
mov r8d, r12d
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
xor esi, esi
and dword [rbp + 0xc8], esi
xor edi, edi
mov rcx, qword [rbp - 0x50]
mov rax, rcx
sub rax, rsi
cmp r14, rax
jle 0x1400304c1
mov r12d, ecx
sub r12d, esi
and qword [rsp + 0x20], 0
lea r9, [rbp + 0xc0]
mov r8d, r12d
mov rdx, rbx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_WriteFile]
cmp eax, 1
jne 0x140030605
mov eax, dword [rbp + 0xc0]
add rdi, rax
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointerEx]
cmp eax, 1
jne 0x1400305f3
mov r14d, r12d
add rsi, r14
mov qword [rsp + 0x50], rsi
xorps xmm1, xmm1
cvtsi2ss xmm1, rsi
mov rax, qword [rbp - 0x50]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
divss xmm1, xmm0
mulss xmm1, dword [0x140083b70]
cvttss2si rcx, xmm1
cmp ecx, dword [rbp + 0xc8]
je 0x14003055c
mov dword [rbp + 0xc8], ecx
mov dword [r15 + 0x68], 0x80042409
mov dword [r15 + 0x6c], ecx
mov rax, qword [rbp - 0x50]
cmp rsi, rax
jge 0x14003058d
mov r14, qword [r15 + 0x48]
add r14, 0x78
mov qword [rbp - 0x68], r14
mov rcx, r14
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_EnterCriticalSection]
nop
mov esi, dword [r15 + 0x70]
mov rcx, r14
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_LeaveCriticalSection]
test esi, esi
jne 0x1400305c8
mov r14d, r12d
jmp 0x1400305b5
mov rsi, qword [r15 + 0x48]
add rsi, 0x78
mov qword [rsp + 0x68], rsi
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_EnterCriticalSection]
nop
mov dword [r15 + 0x74], 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_LeaveCriticalSection]
mov rcx, qword [rbp - 0x50]
mov rsi, qword [rsp + 0x50]
cmp rsi, rcx
jge 0x1400305e3
jmp 0x1400304b0
mov dword [rbp + 0xb8], 0x4241a
mov r9d, dword [rsp + 0x40]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__11___lX
jmp 0x140030430
lea rdx, [r13 + 8]
mov ecx, 0xa
call fcn.140012db0
jmp 0x140030629
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__10___lX
jmp 0x140030418
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__9___lX
jmp 0x140030418
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__8___lX
jmp 0x140030418
and dword [rbp + 0xb8], 0
cmp dword [r13 + 0x58], 1
jne 0x140030643
mov rax, qword [rsp + 0x58]
and dword [rax + 0x148], 0
mov eax, dword [rbp + 0xb8]
mov dword [r15 + 0x68], eax
mov dword [r15 + 0x6c], 0x64
mov eax, dword [rbp + 0xb8]
mov dword [r15 + 0x68], eax
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
mov rsi, qword [rsp + 0x30]
test rsi, rsi
je 0x14003068e
mov rax, qword [rsi]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
mov rcx, rsi
call rdi
and qword [rsp + 0x30], 0
xor r14d, r14d
jmp 0x14003071a
mov dword [rsp + 0x20], eax
mov r9d, esi
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__1___lX___lX
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_void___cdecl_VdsTraceEx_unsigned_long_int__unsigned_long_int__char____ptr64_]
test esi, esi
jns 0x1400306b9
mov dword [r15 + 0x68], esi
jmp 0x1400306c3
mov eax, dword [rbp + 0xb8]
mov dword [r15 + 0x68], eax
mov rcx, qword [r15 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_SetEvent]
mov rsi, qword [rsp + 0x30]
test rsi, rsi
je 0x1400306f2
mov rax, qword [rsi]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [sym.vds.exe_public:_void___cdecl_CVdsPtr_char_::destructor_void____ptr64]
mov rcx, rsi
call rdi
and qword [rsp + 0x30], 0
cmp dword [r13 + 0x54], 0
je 0x14003071a
xor eax, eax
xchg dword [0x1400a13b0], eax
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [0x1400a0d78]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSemaphore]
mov rbx, qword [rsp + 0x48]
lea rcx, [rbp - 0x80]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::destructor_void____ptr64]
nop
test rbx, rbx
je 0x140030744
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.vdsutil.dll_int___cdecl_VdsHeapFree_void____ptr64__unsigned_long_int__void____ptr64_]
and qword [rsp + 0x48], 0
mov rcx, qword [rsp + 0x38]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x14003075f
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
or qword [rsp + 0x38], 0xffffffffffffffff
mov eax, r14d
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret