Function at 0x1400ed720
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x90
mov rax, qword [0x140209b48]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor r15d, r15d
mov r12, rdx
mov rdi, rcx
cmp dword [rcx + 0xa8], r15d
mov esi, r15d
jbe 0x1400ed9d2
mov rbp, r15
mov rax, qword [rdi + 0xa0]
mov rbx, qword [rax + rbp]
mov edx, dword [rbx + 0x50]
test edx, edx
je 0x1400ed7a2
mov r8d, dword [r12]
mov ecx, dword [rbx + 0x54]
mov eax, r8d
sub eax, ecx
cmp eax, edx
jae 0x1400ed7a2
mov eax, dword [r12 + 4]
sub ecx, r8d
add ecx, edx
test eax, eax
je 0x1400ed798
cmp ecx, eax
jae 0x1400ed9bf
mov dword [r12 + 4], ecx
jmp 0x1400ed9bf
mov eax, dword [rbx + 0x80]
cmp eax, 2
jne 0x1400ed801
mov rcx, qword [rbx + 0x40]
lea rdx, [rbx + 0x58]
lea r8, [rsp + 0x40]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400ed7da
mov r8, r12
mov rdx, rbx
mov rcx, rdi
call fcn.1400ebb90
jmp 0x1400ed9bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e4
je 0x1400ed9bf
mov r9, r12
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call fcn.1400ebc90
jmp 0x1400ed9bf
cmp eax, 1
jne 0x1400ed9bf
cmp qword [rbx + 0x40], 0xffffffffffffffff
jne 0x1400ed83b
mov rcx, qword [rbx + 0x38]
mov edx, 0x80000000
mov r8d, eax
call fcn.1400d5a60
mov edx, dword [rbx + 0x84]
lea rcx, str.open_volume__u__p_n
mov r8, rax
mov qword [rbx + 0x40], rax
call fcn.1400b35e0
mov r8, qword [rbx + 0x40]
lea rcx, str.update_monitor__d_read:_hcjoverlapped__d_n
mov edx, esi
call fcn.1400b35e0
mov r11, qword [rbx + 0x40]
cmp r11, 0xffffffffffffffff
je 0x1400ed9a8
mov rcx, qword [0x14020b2d0]
test rcx, rcx
je 0x1400ed907
cmp qword [rbx + 0x78], r15
jne 0x1400ed907
xor eax, eax
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rax
lea r8d, [rax + 1]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x48], 0x38
mov dword [rsp + 0x4c], 6
mov qword [rsp + 0x58], r11
call fcn.1400d7bc0
mov qword [rbx + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rbx + 0x78]
mov edx, dword [rbx + 0x84]
lea rcx, str.RegisterDeviceNotification_monitor__d__p__d_n
mov r9d, eax
call fcn.1400b35e0
cmp qword [rbx + 0x78], r15
jne 0x1400ed907
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, dword [rbx + 0x84]
lea rdx, str.RegisterDeviceNotification_monitor__d_failed___d_n
mov r9d, eax
mov ecx, 0xffff0000
call fcn.1400b3610
cmp qword [rbx + 0x70], r15
jne 0x1400ed916
call fcn.1400d78a0
mov qword [rbx + 0x70], rax
lea rax, [rbx + 0x58]
lea rcx, [rbx + 0xc]
lea r8, [rbx + 0x10]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbx + 0x40]
mov edx, 0x900bb
mov r9d, 0x28
mov dword [rsp + 0x28], 9
mov dword [rbx + 0x68], r15d
mov dword [rbx + 0x6c], r15d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1400ed96a
mov r8, r12
mov rdx, rbx
mov rcx, rdi
call fcn.1400ebb90
jmp 0x1400ed9bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400ed995
mov edx, dword [rbx + 0x84]
lea rcx, str.READING_NTFS__d_n
call fcn.1400b35e0
mov dword [rbx + 0x80], 2
jmp 0x1400ed9bf
mov r9, r12
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call fcn.1400ebc90
jmp 0x1400ed9bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, r12
mov rdx, rbx
mov r8d, eax
mov rcx, rdi
call fcn.1400ebc90
add esi, 1
add rbp, 8
cmp esi, dword [rdi + 0xa8]
jb 0x1400ed760
cmp dword [rdi + 0xb8], r15d
mov r13d, r15d
jbe 0x1400eded1
mov qword [rsp + 0xe0], r14
mov r14, r15
nop
mov rax, qword [rdi + 0xb0]
mov rsi, qword [r14 + rax]
mov edx, dword [rsi + 0x58]
test edx, edx
je 0x1400eda32
mov r8d, dword [r12]
mov ecx, dword [rsi + 0x5c]
mov eax, r8d
sub eax, ecx
cmp eax, edx
jae 0x1400eda32
mov eax, dword [r12 + 4]
sub ecx, r8d
add ecx, edx
test eax, eax
je 0x1400eda28
cmp ecx, eax
jae 0x1400edeb4
mov dword [r12 + 4], ecx
jmp 0x1400edeb4
mov eax, dword [rsi + 0x88]
cmp eax, 2
jne 0x1400edc59
mov rcx, qword [rsi + 0x48]
lea rdx, [rsi + 0x60]
lea r8, [rsp + 0x44]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400edc32
mov edx, dword [rsi + 0x8c]
lea rcx, str.data_available_on_refs_monitor__d_n
call fcn.1400b35e0
mov edx, 3
mov dword [rsi + 0x88], 3
mov dword [rsi + 0x58], 0x3e8
mov eax, dword [r12]
lea rcx, str.write_reply__d__u_n
lea r8d, [rdx + 1]
mov dword [rsi + 0x5c], eax
call fcn.1400b35e0
mov ecx, 0x20
call fcn.1400ce030
mov ecx, ntohs
mov dword [rax + 0x18], ntohs
mov rbx, rax
call fcn.1400ce030
mov ecx, dword [rbx + 0x18]
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov dword [rax], ecx
mov dword [rax + 4], 3
mov ecx, dword [rsi + 0x8c]
mov dword [rax + 8], ecx
cmp qword [rdi + 0x80], r15
je 0x1400edaee
mov rax, qword [rdi + 0x88]
mov qword [rax], rbx
jmp 0x1400edaf5
mov qword [rdi + 0x80], rbx
mov qword [rbx], r15
mov qword [rdi + 0x88], rbx
mov rbx, qword [rdi + 0x80]
test rbx, rbx
je 0x1400edc14
nop
cmp dword [rbx + 0x18], r15d
mov rbp, qword [rbx]
je 0x1400edb94
nop
nop
cmp dword [rdi + 0x90], r15d
je 0x1400edb57
mov rcx, qword [rdi + 0x50]
lea rdx, [rdi + 0x30]
lea r8, [rsp + 0x40]
xor r9d, r9d
mov dword [rdi + 0x90], r15d
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400edbc6
mov ecx, dword [rsp + 0x40]
add qword [rbx + 0x10], rcx
sub dword [rbx + 0x18], ecx
jmp 0x1400edb8e
mov rcx, qword [rdi + 0x50]
mov dword [rdi + 0x40], r15d
mov dword [rdi + 0x44], r15d
mov r8d, dword [rbx + 0x18]
mov rdx, qword [rbx + 0x10]
lea rax, [rdi + 0x30]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400edbe8
mov edx, dword [rsp + 0x40]
add qword [rbx + 0x10], rdx
sub dword [rbx + 0x18], edx
cmp dword [rbx + 0x18], r15d
jne 0x1400edb20
mov rcx, qword [rbx + 8]
call fcn.1400ce0b0
mov rcx, rbx
call fcn.1400ce0b0
test rbp, rbp
mov qword [rdi + 0x80], rbp
jne 0x1400edbb8
mov qword [rdi + 0x88], r15
test rbp, rbp
mov rbx, rbp
jne 0x1400edb10
jmp 0x1400edc14
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e4
jne 0x1400edbdf
mov dword [rdi + 0x90], 1
jmp 0x1400edc14
mov dword [rdi + 0x5c], 1
jmp 0x1400edc14
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400edc0d
lea rcx, str.write_pending..._n
call fcn.1400b35e0
mov dword [rdi + 0x90], 1
jmp 0x1400edc14
mov dword [rdi + 0x5c], 1
mov ecx, dword [r12 + 4]
mov eax, dword [rsi + 0x58]
test ecx, ecx
je 0x1400edc28
cmp eax, ecx
jae 0x1400edeb4
mov dword [r12 + 4], eax
jmp 0x1400edeb4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e4
je 0x1400edeb4
mov r9, r12
mov r8d, eax
mov rdx, rsi
mov rcx, rdi
call fcn.1400ebf80
jmp 0x1400edeb4
cmp eax, 1
jne 0x1400edeb4
cmp qword [rsi + 0x48], 0xffffffffffffffff
jne 0x1400edc7e
mov rcx, qword [rsi + 0x40]
mov edx, 0x80000000
mov r8d, eax
call fcn.1400d5a60
mov qword [rsi + 0x48], rax
mov r8, qword [rsi + 0x48]
lea rcx, str.update_monitor__d_read:_hcjoverlapped__d_n
mov edx, r13d
call fcn.1400b35e0
mov r11, qword [rsi + 0x48]
cmp r11, 0xffffffffffffffff
je 0x1400ede9d
mov rcx, qword [0x14020b2d0]
test rcx, rcx
je 0x1400edd57
cmp qword [rsi + 0x80], r15
jne 0x1400edd57
xor eax, eax
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rax
lea r8d, [rax + 1]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x48], 0x38
mov dword [rsp + 0x4c], 6
mov qword [rsp + 0x58], r11
call fcn.1400d7bc0
mov qword [rsi + 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi + 0x80]
mov edx, dword [rsi + 0x8c]
lea rcx, str.RegisterDeviceNotification_monitor__d__p__d_n
mov r9d, eax
call fcn.1400b35e0
cmp qword [rsi + 0x80], r15
jne 0x1400edd57
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, dword [rsi + 0x8c]
lea rdx, str.RegisterDeviceNotification_monitor__d_failed___d_n
mov r9d, eax
mov ecx, 0xffff0000
call fcn.1400b3610
cmp qword [rsi + 0x78], r15
jne 0x1400edd66
call fcn.1400d78a0
mov qword [rsi + 0x78], rax
lea rax, [rsi + 0x60]
lea rcx, [rsi + 0xc]
lea rdx, [rsi + 0x10]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsi + 0x48]
mov r9d, 9
mov r8, rsi
mov dword [rsi + 0x70], r15d
mov dword [rsi + 0x74], r15d
call fcn.1400da930
test eax, eax
je 0x1400ede5f
mov edx, dword [rsi + 0x8c]
lea rcx, str.data_available_on_refs_monitor__d_n
call fcn.1400b35e0
mov edx, 3
mov dword [rsi + 0x88], 3
mov dword [rsi + 0x58], 0x3e8
mov eax, dword [r12]
lea rcx, str.write_reply__d__u_n
lea r8d, [rdx + 1]
mov dword [rsi + 0x5c], eax
call fcn.1400b35e0
mov ecx, 0x20
call fcn.1400ce030
mov ecx, ntohs
mov dword [rax + 0x18], ntohs
mov rbx, rax
call fcn.1400ce030
mov ecx, dword [rbx + 0x18]
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov dword [rax], ecx
mov dword [rax + 4], 3
mov ecx, dword [rsi + 0x8c]
mov dword [rax + 8], ecx
cmp qword [rdi + 0x80], r15
je 0x1400ede2d
mov rax, qword [rdi + 0x88]
mov qword [rax], rbx
jmp 0x1400ede34
mov qword [rdi + 0x80], rbx
mov qword [rbx], r15
mov rcx, rdi
mov qword [rdi + 0x88], rbx
call fcn.1400eb750
mov eax, dword [r12 + 4]
mov r11d, dword [rsi + 0x58]
test eax, eax
je 0x1400ede58
cmp r11d, eax
jae 0x1400edeb4
mov dword [r12 + 4], r11d
jmp 0x1400edeb4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400ede8a
mov edx, dword [rsi + 0x8c]
lea rcx, str.READING_REFS__d_n
call fcn.1400b35e0
mov dword [rsi + 0x88], 2
jmp 0x1400edeb4
mov r9, r12
mov r8d, eax
mov rdx, rsi
mov rcx, rdi
call fcn.1400ebf80
jmp 0x1400edeb4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, r12
mov rdx, rsi
mov r8d, eax
mov rcx, rdi
call fcn.1400ebf80
add r13d, 1
add r14, 8
cmp r13d, dword [rdi + 0xb8]
jb 0x1400ed9f0
mov r14, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.1401a6ae0
add rsp, 0x90
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret