Function at 0x140087d44
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 [0x14017a048]
lea r13, [0x14017a048]
cmp rcx, r13
je 0x140087da0
test byte [rcx + 0x1c], 1
je 0x140087da0
cmp byte [rcx + 0x19], 4
jb 0x140087da0
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015d698]
mov edx, 0x25
call fcn.140006b98
mov rcx, qword [0x14017a048]
xor ebx, ebx
mov dword [rsp + 0x70], ebx
test rsi, rsi
jne 0x140087dca
lea r8, str.wszfilePath___NULL
mov edx, 0x20e
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.14008ac24
mov rcx, qword [0x14017a048]
test edi, edi
jne 0x140087ded
lea r8, str.cToSave___0
mov edx, 0x20f
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.14008ac24
mov rcx, qword [0x14017a048]
test r14, r14
jne 0x140087e11
lea r8, str.pbToSave___NULL
mov edx, 0x210
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.14008ac24
mov rcx, qword [0x14017a048]
cmp rcx, r13
je 0x140087e3a
test byte [rcx + 0x1c], 1
je 0x140087e3a
cmp byte [rcx + 0x19], 4
jb 0x140087e3a
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015d698]
mov edx, 0x26
mov r9, rsi
call fcn.1400112c8
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 0x140087ed5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jg 0x140087e87
mov ebx, eax
jmp 0x140087e90
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x14017a048]
cmp rcx, r13
je 0x140087fa1
test byte [rcx + 0x1c], 1
je 0x140087f7b
cmp byte [rcx + 0x19], 2
jb 0x140087f7b
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015d698]
mov edx, 0x27
mov dword [rsp + 0x20], ebx
mov r9, rsi
call fcn.140011330
jmp 0x140087f74
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 0x140087f47
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jg 0x140087f0c
mov ebx, eax
jmp 0x140087f15
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x14017a048]
cmp rcx, r13
je 0x140087f65
test byte [rcx + 0x1c], 1
je 0x140087f65
cmp byte [rcx + 0x19], 2
jb 0x140087f65
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015d698]
mov edx, 0x28
mov r9d, ebx
call fcn.140006bc4
jmp 0x140087f65
cmp edi, dword [rsp + 0x70]
je 0x140087f65
lea r8, str.cToSave__dwBytesWritten
mov edx, 0x233
lea rcx, str.base_stor_blbengine_service_sppmetadatamanager.cpp
call fcn.14008ac24
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [0x14017a048]
cmp rcx, r13
je 0x140087fa1
test byte [rcx + 0x1c], 1
je 0x140087fa1
cmp byte [rcx + 0x19], 4
jb 0x140087fa1
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015d698]
mov edx, 0x29
call fcn.140006b98
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