Function at 0x140046290
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 r12, rdx
xor r15d, r15d
mov qword [rsp + 0x40], r15
mov dword [rbp + 0xb8], r15d
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x30], r15d
or qword [rsp + 0x38], 0xffffffffffffffff
mov ebx, r15d
mov qword [rsp + 0x58], rbx
mov r14d, 0x100000
mov dword [rbp + 0xc0], r14d
mov dword [rbp + 0xc8], r15d
mov edi, r15d
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__
lea edx, [r15 + 0x5e]
lea rcx, [rsp + 0x68]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::constructor_unsigned_long_int__char_const____ptr64____ptr64]
nop dword [rax + rax]
nop
mov r13, qword [r12 + 0x48]
mov rcx, qword [r13 + 0x40]
mov rax, qword [rcx]
movabs r10, 0xdee01e7974d59970
lea r8, [rsp + 0x40]
lea rdx, [0x140068f70]
mov rax, qword [rax]
call qword [0x140065990]
mov esi, eax
test eax, eax
jns 0x140046375
mov r9d, eax
lea r8, str.CVdsDiskLun::PostCleanDiskHandler:_pAsync_QueryInterface_failed:__lX
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
mov dword [r13 + 0x68], esi
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
jmp 0x140046a18
cmp dword [r12 + 0x54], r15d
je 0x14004638e
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
nop dword [rax + rax]
mov dword [0x1400a44a0], eax
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx]
movabs r10, 0xfd048f26585be270
lea r8, [rbp + 0x30]
lea rdx, [rbp + 0xb8]
mov rax, qword [rax + 0x20]
call qword [0x140065990]
mov esi, eax
mov dword [rsp + 0x48], eax
mov eax, dword [rbp + 0xb8]
test esi, esi
js 0x1400469b4
test eax, eax
js 0x1400469b4
cmp dword [r12 + 0x50], 1
jne 0x1400463ea
mov dword [r13 + 0x6c], 0x64
mov dword [r13 + 0x68], r15d
jmp 0x1400469e7
cmp dword [r12 + 0x54], r15d
je 0x140046569
call qword [sym.imp.vdsutil.dll_GarbageCollectDriveLetters]
nop dword [rax + rax]
lea rcx, [r12 + 0x18]
call qword [sym.imp.vdsutil.dll_DeleteBcdObjects]
nop dword [rax + rax]
test eax, eax
jns 0x140046434
mov r9d, eax
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__2__status_lX
mov edx, 1
lea ecx, [rdx + 0x5d]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
lea rdx, [r12 + 8]
mov rcx, qword [r12 + 0x40]
call fcn.140013184
test eax, eax
je 0x14004647c
mov dword [r13 + 0x68], 0x8000ffff
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
lea rdx, [r12 + 8]
mov ecx, 9
call fcn.1400234ec
mov edi, r15d
jmp 0x1400469f7
lea rcx, [0x1400a3e40]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop dword [rax + rax]
nop
mov rdi, qword [rbp + 0xb0]
mov rdi, qword [rdi + 0xd0]
test rdi, rdi
je 0x1400464bf
mov rax, qword [rdi]
movabs r10, 0xfd41b67356dad870
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [0x140065990]
jmp 0x1400464dd
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__3__m_pUnk__NULL
mov edx, 1
lea ecx, [rdx + 0x5d]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
mov rdi, r15
lea rcx, [0x1400a3e40]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
test rdi, rdi
je 0x140046569
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
lea rcx, [r12 + 8]
call fcn.140022fd0
mov esi, eax
mov dword [rsp + 0x48], eax
mov rax, qword [rdi]
movabs r10, 0xbaac1f10365eb170
mov rcx, rdi
mov rax, qword [rax + 0x10]
call qword [0x140065990]
test esi, esi
jns 0x140046569
mov r9d, esi
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__4___lX
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
mov dword [r13 + 0x68], 0x80042419
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
mov edi, 0x80042419
jmp 0x1400469f7
mov edi, 1
cmp dword [r12 + 0x58], edi
jne 0x1400465e7
movups xmm0, xmmword [r12 + 8]
movdqu xmmword [rbp - 0x70], xmm0
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.140015a1c
mov qword [rsp + 0x60], rax
test rax, rax
jne 0x1400465e1
mov dword [rbp + 0xb8], 0x80042405
mov r9d, esi
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__5___lX
xor edx, edx
lea ecx, [rdi + 0x5d]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
mov eax, dword [rbp + 0xb8]
mov dword [r13 + 0x68], eax
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
jmp 0x140046474
mov dword [rax + 0x158], edi
cmp dword [r12 + 0x54], r15d
je 0x140046614
mov eax, r15d
xchg dword [0x1400a44a0], eax
xor r8d, r8d
mov edx, edi
mov rcx, qword [0x1400a3e68]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSemaphore]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x58]
cmp dword [r12 + 0x58], edi
jne 0x140046880
lea r8, [rsp + 0x38]
mov edx, 0xc0000000
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.vdsutil.dll_OpenDevice]
nop dword [rax + rax]
test eax, eax
je 0x14004666e
jle 0x140046648
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__6___lX
mov dword [rbp + 0xb8], eax
mov r9d, eax
xor edx, edx
lea ecx, [rdx + 0x5e]
call qword [sym.imp.vdsutil.dll_VdsTraceEx]
nop dword [rax + rax]
jmp 0x140046887
lea rdx, [rbp - 0x60]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.vdsutil.dll_GetPartitionInformation]
nop dword [rax + rax]
test eax, eax
je 0x14004669a
jle 0x140046691
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__7___lX
jmp 0x14004664f
test rbx, rbx
jne 0x140046711
cmp r14d, 0x200
jb 0x1400466ed
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
mov r8d, r14d
lea edx, [rbx + 8]
call qword [sym.imp.vdsutil.dll_VdsHeapAlloc]
nop dword [rax + rax]
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
sete al
mov ecx, r14d
shr ecx, 1
test al, al
cmove ecx, r14d
mov r14d, ecx
mov dword [rbp + 0xc0], ecx
jmp 0x14004669a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x140046705
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__8___lX
jmp 0x14004664f
mov r8d, r14d
xor edx, edx
mov rcx, rbx
call sub.msvcrt.dll_memset
mov rsi, r15
mov dword [rsp + 0x30], r15d
mov rdi, r15
mov rcx, qword [rbp - 0x50]
mov rax, rcx
sub rax, rsi
mov edx, r14d
cmp rdx, rax
jle 0x140046748
mov r14d, ecx
sub r14d, esi
mov dword [rbp + 0xc0], r14d
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0xc8]
mov r8d, r14d
mov rdx, rbx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
nop dword [rax + rax]
cmp eax, 1
jne 0x140046990
mov eax, dword [rbp + 0xc8]
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_1_0.dll_SetFilePointerEx]
nop dword [rax + rax]
cmp eax, 1
jne 0x14004696c
mov eax, r14d
add rsi, rax
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 [0x140093944]
cvttss2si rcx, xmm1
cmp ecx, dword [rsp + 0x30]
je 0x1400467ea
mov dword [rsp + 0x30], ecx
mov dword [r13 + 0x68], 0x80042409
mov dword [r13 + 0x6c], ecx
mov rax, qword [rbp - 0x50]
mov rcx, qword [r13 + 0x48]
cmp rsi, rax
jge 0x140046830
lea r14, [rcx + 0x78]
mov qword [rsp + 0x78], r14
mov rcx, r14
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop dword [rax + rax]
nop
mov esi, dword [r13 + 0x70]
mov rcx, r14
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
test esi, esi
jne 0x140046951
mov r14d, dword [rbp + 0xc0]
jmp 0x14004685f
lea rsi, [rcx + 0x78]
mov qword [rbp - 0x80], rsi
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop dword [rax + rax]
nop
mov dword [r13 + 0x74], 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x50]
mov rsi, qword [rsp + 0x50]
cmp rsi, rcx
jl 0x14004672d
lea rdx, [r12 + 8]
mov ecx, 0xa
call fcn.1400234ec
mov dword [rbp + 0xb8], r15d
cmp dword [r12 + 0x58], 1
jne 0x14004689b
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x158], r15d
mov eax, dword [rbp + 0xb8]
mov dword [r13 + 0x68], eax
mov dword [r13 + 0x6c], 0x64
mov eax, dword [rbp + 0xb8]
mov dword [r13 + 0x68], eax
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400468ed
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x140065990]
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x68]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::destructor_void____ptr64]
nop dword [rax + rax]
nop
test rbx, rbx
je 0x140046929
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]
mov qword [rsp + 0x58], r15
mov rcx, qword [rsp + 0x38]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14004694a
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
or qword [rsp + 0x38], 0xffffffffffffffff
xor eax, eax
jmp 0x140046a7b
mov dword [rbp + 0xb8], 0x4241a
mov r9d, dword [rsp + 0x48]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__11___lX
jmp 0x140046658
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x140046984
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__10___lX
jmp 0x14004664f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x1400469a8
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__9___lX
jmp 0x14004664f
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_VdsTraceEx]
nop dword [rax + rax]
test esi, esi
jns 0x1400469dd
mov dword [r13 + 0x68], esi
jmp 0x1400469e7
mov eax, dword [rbp + 0xb8]
mov dword [r13 + 0x68], eax
mov rcx, qword [r13 + 0x60]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140046a1d
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x140065990]
mov qword [rsp + 0x40], r15
cmp dword [r12 + 0x54], r15d
je 0x140046a46
xchg dword [0x1400a44a0], r15d
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [0x1400a3e68]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSemaphore]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.vdsutil.dll_public:_void___cdecl_CVdsCallTracer::destructor_void____ptr64]
nop dword [rax + rax]
nop
mov rcx, qword [rsp + 0x38]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x140046a79
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
or qword [rsp + 0x38], 0xffffffffffffffff
mov eax, edi
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret