Function at 0x140050950
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xe0
mov qword [rbp - 0x49], 0xfffffffffffffffe
mov qword [rsp + 0x128], rbx
mov rax, qword [0x1400bf030]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14d, r8d
mov rdi, rdx
mov rsi, rcx
xor r15d, r15d
mov dword [rbp - 0x75], 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 - 0x41], rax
test rax, rax
jne 0x140050a14
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rbp - 0x79], eax
lea rax, vtable.LogItem.0
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r15
mov word [rbp - 0x31], r15w
mov qword [rbp + 7], 7
mov qword [rbp - 1], r15
mov word [rbp - 0x11], r15w
mov dword [rbp + 0xf], 1
mov dword [rbp + 0x13], 1
lea rdx, str.Cannot_create_write_event._Error:
lea rcx, [rbp - 0x39]
call fcn.140025050
mov rcx, rax
lea rdx, [rbp - 0x79]
call fcn.140024e10
nop
jmp 0x140050bbc
mov qword [rbp - 0x51], rbx
mov qword [rbp - 0x59], r15
lea rax, [rbp - 0x69]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x75]
mov r8d, r14d
mov rdx, rdi
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.DLL_WriteFile]
mov edi, eax
mov dword [rbp - 0x79], eax
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rbp - 0x71], eax
test edi, edi
jne 0x140050aca
cmp eax, 0x3e5
je 0x140050aca
lea rax, vtable.LogItem.0
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r15
mov word [rbp - 0x31], r15w
mov qword [rbp + 7], 7
mov qword [rbp - 1], r15
mov word [rbp - 0x11], r15w
mov dword [rbp + 0xf], 1
mov dword [rbp + 0x13], 1
lea rdx, str.Write_to_device_failed._Return_code:
lea rcx, [rbp - 0x39]
call fcn.140025050
mov rcx, rax
lea rdx, [rbp - 0x79]
call fcn.140024f30
mov rcx, rax
lea rdx, str._Error:
call fcn.140025050
mov rcx, rax
lea rdx, [rbp - 0x71]
call fcn.140024e10
nop
jmp 0x140050bbc
mov edx, dword [rsi + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp eax, 0x102
jne 0x140050b42
lea rax, vtable.LogItem.0
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r15
mov word [rbp - 0x31], r15w
mov qword [rbp + 7], 7
mov qword [rbp - 1], r15
mov word [rbp - 0x11], r15w
mov dword [rbp + 0xf], 1
mov dword [rbp + 0x13], 1
lea rdx, str.Timeout_occured_while_writing_to_heci_device.
lea rcx, [rbp - 0x39]
call fcn.140025050
nop
lea rcx, [rbp - 0x39]
call fcn.140024bf0
mov rdx, rbx
mov rcx, rsi
call fcn.14004f830
jmp 0x140050bcd
xor r9d, r9d
lea r8, [rbp - 0x75]
lea rdx, [rbp - 0x69]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.DLL_GetOverlappedResult]
test eax, eax
jne 0x140050bd2
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rbp - 0x79], eax
lea rax, vtable.LogItem.0
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r15
mov word [rbp - 0x31], r15w
mov qword [rbp + 7], 7
mov qword [rbp - 1], r15
mov word [rbp - 0x11], r15w
mov dword [rbp + 0xf], 1
mov dword [rbp + 0x13], 1
lea rdx, str.Write_function_fail_to_finish._Error:
lea rcx, [rbp - 0x39]
call fcn.140025050
mov rcx, rax
lea rdx, [rbp - 0x79]
call fcn.140024e10
nop
lea rcx, [rbp - 0x39]
call fcn.140024bf0
mov rcx, rsi
call fcn.140050530
or edi, 0xffffffff
jmp 0x140050bd5
mov edi, dword [rbp - 0x75]
cmp rbx, 0xffffffffffffffff
je 0x140050be4
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14005b100
mov rbx, qword [rsp + 0x128]
add rsp, 0xe0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret