Function at 0x14004d580
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, [0x140072170]
mov rax, qword [rax]
call qword [0x14006eaa8]
mov esi, eax
test eax, eax
jns 0x14004d665
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 0x14004dd08
cmp dword [r12 + 0x54], r15d
je 0x14004d67e
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
nop dword [rax + rax]
mov dword [0x1400af660], 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 [0x14006eaa8]
mov esi, eax
mov dword [rsp + 0x48], eax
mov eax, dword [rbp + 0xb8]
test esi, esi
js 0x14004dca4
test eax, eax
js 0x14004dca4
cmp dword [r12 + 0x50], 1
jne 0x14004d6da
mov dword [r13 + 0x6c], 0x64
mov dword [r13 + 0x68], r15d
jmp 0x14004dcd7
cmp dword [r12 + 0x54], r15d
je 0x14004d859
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 0x14004d724
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.140015594
test eax, eax
je 0x14004d76c
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.140028a4c
mov edi, r15d
jmp 0x14004dce7
lea rcx, [0x1400af000]
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 0x14004d7af
mov rax, qword [rdi]
movabs r10, 0xfd41b67356dad870
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [0x14006eaa8]
jmp 0x14004d7cd
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, [0x1400af000]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
test rdi, rdi
je 0x14004d859
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
lea rcx, [r12 + 8]
call fcn.140028320
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 [0x14006eaa8]
test esi, esi
jns 0x14004d859
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 0x14004dce7
mov edi, 1
cmp dword [r12 + 0x58], edi
jne 0x14004d8d7
movups xmm0, xmmword [r12 + 8]
movdqu xmmword [rbp - 0x70], xmm0
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.1400185cc
mov qword [rsp + 0x60], rax
test rax, rax
jne 0x14004d8d1
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 0x14004d764
mov dword [rax + 0x158], edi
cmp dword [r12 + 0x54], r15d
je 0x14004d904
mov eax, r15d
xchg dword [0x1400af660], eax
xor r8d, r8d
mov edx, edi
mov rcx, qword [0x1400af028]
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 0x14004db70
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 0x14004d95e
jle 0x14004d938
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 0x14004db77
lea rdx, [rbp - 0x60]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.vdsutil.dll_GetPartitionInformation]
nop dword [rax + rax]
test eax, eax
je 0x14004d98a
jle 0x14004d981
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__7___lX
jmp 0x14004d93f
test rbx, rbx
jne 0x14004da01
cmp r14d, 0x200
jb 0x14004d9dd
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 0x14004d98a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x14004d9f5
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__8___lX
jmp 0x14004d93f
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 0x14004da38
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 0x14004dc80
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 0x14004dc5c
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 [0x14009cfb4]
cvttss2si rcx, xmm1
cmp ecx, dword [rsp + 0x30]
je 0x14004dada
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 0x14004db20
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 0x14004dc41
mov r14d, dword [rbp + 0xc0]
jmp 0x14004db4f
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 0x14004da1d
lea rdx, [r12 + 8]
mov ecx, 0xa
call fcn.140028a4c
mov dword [rbp + 0xb8], r15d
cmp dword [r12 + 0x58], 1
jne 0x14004db8b
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 0x14004dbdd
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x14006eaa8]
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 0x14004dc19
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 0x14004dc3a
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 0x14004dd6b
mov dword [rbp + 0xb8], 0x4241a
mov r9d, dword [rsp + 0x48]
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__11___lX
jmp 0x14004d948
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x14004dc74
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__10___lX
jmp 0x14004d93f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x14004dc98
movzx eax, ax
or eax, 0x80070000
lea r8, str.CVdsDiskLun::PostCleanDiskHandler__9___lX
jmp 0x14004d93f
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 0x14004dccd
mov dword [r13 + 0x68], esi
jmp 0x14004dcd7
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 0x14004dd0d
mov rax, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
call qword [0x14006eaa8]
mov qword [rsp + 0x40], r15
cmp dword [r12 + 0x54], r15d
je 0x14004dd36
xchg dword [0x1400af660], r15d
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [0x1400af028]
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 0x14004dd69
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