Function at 0x14004a490
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xd0
mov rax, qword [0x1400a5038]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14d, r8d
mov rdi, rdx
mov rsi, rcx
xor r15d, r15d
mov dword [rbp - 0x65], r15d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, rax
mov qword [rbp - 0x39], rax
test rax, rax
jne 0x14004a548
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x69], eax
lea rax, vtable.LogItem.0
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r15w
mov qword [rbp + 0xf], r15
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r15w
mov dword [rbp + 0x1f], 1
mov dword [rbp + 0x23], 1
lea rdx, str.Cannot_create_write_event._Error:
lea rcx, [rbp - 0x29]
call fcn.14001dd30
mov rcx, rax
lea rdx, [rbp - 0x69]
call fcn.14001db30
nop
jmp 0x14004a6f9
mov qword [rbp - 0x41], rbx
mov qword [rbp - 0x49], r15
lea rax, [rbp - 0x59]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x65]
mov r8d, r14d
mov rdx, rdi
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
mov dword [rbp - 0x69], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x61], eax
test edi, edi
jne 0x14004a5fe
cmp eax, 0x3e5
je 0x14004a5fe
lea rax, vtable.LogItem.0
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r15w
mov qword [rbp + 0xf], r15
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r15w
mov dword [rbp + 0x1f], 1
mov dword [rbp + 0x23], 1
lea rdx, str.Write_to_device_failed._Return_code:
lea rcx, [rbp - 0x29]
call fcn.14001dd30
mov rcx, rax
lea rdx, [rbp - 0x69]
call fcn.14001dc30
mov rcx, rax
lea rdx, str._Error:
call fcn.14001dd30
mov rcx, rax
lea rdx, [rbp - 0x61]
call fcn.14001db30
nop
jmp 0x14004a6f9
mov edx, dword [rsi + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14004a67b
lea rax, vtable.LogItem.0
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r15w
mov qword [rbp + 0xf], r15
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r15w
mov dword [rbp + 0x1f], 1
mov dword [rbp + 0x23], 1
lea rdx, str.Timeout_occured_while_writing_to_heci_device.
lea rcx, [rbp - 0x29]
call fcn.14001dd30
nop
lea rcx, [rbp - 0x29]
call fcn.14001d880
mov rdx, rbx
mov rcx, rsi
call fcn.140048e70
mov edi, 0xffffffff
jmp 0x14004a71c
xor r9d, r9d
lea r8, [rbp - 0x65]
lea rdx, [rbp - 0x59]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x14004a719
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x69], eax
lea rax, vtable.LogItem.0
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r15w
mov qword [rbp + 0xf], r15
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r15w
mov dword [rbp + 0x1f], 1
mov dword [rbp + 0x23], 1
lea rdx, str.Write_function_fail_to_finish._Error:
lea rcx, [rbp - 0x29]
call fcn.14001dd30
mov rcx, rax
lea rdx, [rbp - 0x69]
call fcn.14001db30
nop
lea rcx, [rbp - 0x29]
call fcn.14001d880
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax + 0x10]
call qword [0x140088938]
mov edi, 0xffffffff
jmp 0x14004a71c
mov edi, dword [rbp - 0x65]
cmp rbx, 0xffffffffffffffff
je 0x14004a72b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400570a0
mov rbx, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret