Function at 0x14008e0f8
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r13
push r14
sub rsp, 0x40
mov edi, r8d
mov r14, rdx
mov rsi, rcx
mov rcx, qword [0x140173048]
lea r13, [0x140173048]
cmp rcx, r13
je 0x14008e154
test byte [rcx + 0x1c], 1
je 0x14008e154
cmp byte [rcx + 0x19], 4
jb 0x14008e154
mov rcx, qword [rcx + 0x10]
lea r8, [0x140155f88]
mov edx, 0x25
call fcn.14000c328
mov rcx, qword [0x140173048]
xor ebx, ebx
mov dword [rsp + 0x70], ebx
test rsi, rsi
jne 0x14008e17e
lea r8, str.wszfilePath___NULL
mov edx, 0x20e
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.1400906e0
mov rcx, qword [0x140173048]
test edi, edi
jne 0x14008e1a1
lea r8, str.cToSave___0
mov edx, 0x20f
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.1400906e0
mov rcx, qword [0x140173048]
test r14, r14
jne 0x14008e1c5
lea r8, str.pbToSave___NULL
mov edx, 0x210
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.1400906e0
mov rcx, qword [0x140173048]
cmp rcx, r13
je 0x14008e1ee
test byte [rcx + 0x1c], 1
je 0x14008e1ee
cmp byte [rcx + 0x19], 4
jb 0x14008e1ee
mov rcx, qword [rcx + 0x10]
lea r8, [0x140155f88]
mov edx, 0x26
mov r9, rsi
call fcn.140015150
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x2000080
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14008e289
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jg 0x14008e23b
mov ebx, eax
jmp 0x14008e244
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x140173048]
cmp rcx, r13
je 0x14008e355
test byte [rcx + 0x1c], 1
je 0x14008e32f
cmp byte [rcx + 0x19], 2
jb 0x14008e32f
mov rcx, qword [rcx + 0x10]
lea r8, [0x140155f88]
mov edx, 0x27
mov dword [rsp + 0x20], ebx
mov r9, rsi
call fcn.1400151b8
jmp 0x14008e328
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], rbx
mov r8d, edi
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x14008e2fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jg 0x14008e2c0
mov ebx, eax
jmp 0x14008e2c9
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x140173048]
cmp rcx, r13
je 0x14008e319
test byte [rcx + 0x1c], 1
je 0x14008e319
cmp byte [rcx + 0x19], 2
jb 0x14008e319
mov rcx, qword [rcx + 0x10]
lea r8, [0x140155f88]
mov edx, 0x28
mov r9d, ebx
call fcn.14000c354
jmp 0x14008e319
cmp edi, dword [rsp + 0x70]
je 0x14008e319
lea r8, str.cToSave__dwBytesWritten
mov edx, 0x233
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.1400906e0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [0x140173048]
cmp rcx, r13
je 0x14008e355
test byte [rcx + 0x1c], 1
je 0x14008e355
cmp byte [rcx + 0x19], 4
jb 0x14008e355
mov rcx, qword [rcx + 0x10]
lea r8, [0x140155f88]
mov edx, 0x29
call fcn.14000c328
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop rdi
ret