Function at 0x14012af58
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x14017a608]
xor rax, rsp
mov qword [rbp + 0x170], rax
or rdi, 0xffffffffffffffff
mov r13, r8
mov r15d, edx
mov r12, rcx
cmp qword [rcx], rdi
jne 0x14012afb2
lea r8, str.m_fileHandle___INVALID_HANDLE_VALUE
mov edx, 0x109
lea rcx, str.base_stor_blbengine_blbengutils_filelogger.cpp
call fcn.14008ac24
and qword [rsp + 0x40], 0
xor esi, esi
and dword [rsp + 0x48], esi
mov rbx, qword [0x14017b2c8]
mov qword [rsp + 0x50], rsi
test rbx, rbx
jne 0x14012afee
lea r8, str.g_hInstance___NULL
mov edx, 0x335
lea rcx, str.base_stor_blbengine_blbengutils_filelogger.cpp
call fcn.14008ac24
mov rbx, qword [0x14017b2c8]
xor r14d, r14d
lea rcx, [rsp + 0x60]
xor edx, edx
mov qword [rsp + 0x58], r14
mov r8d, 0x202
call sub.msvcrt.dll_memset
mov r9d, 0x100
lea r8, [rsp + 0x60]
mov edx, r15d
mov rcx, rbx
call qword [sym.imp.USER32.dll_LoadStringW]
nop dword [rax + rax]
test eax, eax
jne 0x14012b046
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14012b05f
movzx ebx, ax
or ebx, 0x80070000
jmp 0x14012b05f
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x60]
call fcn.14008c1cc
mov r14, qword [rsp + 0x58]
mov ebx, eax
test ebx, ebx
jns 0x14012b0af
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x14012b28e
test byte [rcx + 0x1c], 1
je 0x14012b28e
cmp byte [rcx + 0x19], 2
jb 0x14012b28e
mov rcx, qword [rcx + 0x10]
lea r8, [0x140168960]
mov edx, 0x10
mov dword [rsp + 0x20], ebx
mov r9d, r15d
call fcn.14003d9c4
jmp 0x14012b28e
mov qword [rsp + 0x30], r13
lea rax, [rsp + 0x40]
xor r15d, r15d
mov r9d, 0x400
mov dword [rsp + 0x28], r15d
xor r8d, r8d
mov rdx, r14
mov qword [rsp + 0x20], rax
mov ecx, 0x500
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
nop dword [rax + rax]
test eax, eax
jne 0x14012b14e
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14012b102
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x14012b28e
test byte [rcx + 0x1c], 1
je 0x14012b28e
cmp byte [rcx + 0x19], 2
jb 0x14012b28e
mov edx, 0x11
mov r9, r14
mov rcx, qword [rcx + 0x10]
lea r8, [0x140168960]
mov dword [rsp + 0x20], ebx
call fcn.140011330
jmp 0x14012b28e
mov rcx, qword [rsp + 0x40]
lea rsi, [0x140168818]
mov rdx, rsi
lea r8, [rsp + 0x50]
call fcn.14008bdcc
mov ebx, eax
test eax, eax
jns 0x14012b1b9
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x14012b1af
test byte [rcx + 0x1c], 1
je 0x14012b1af
cmp byte [rcx + 0x19], 2
jb 0x14012b1af
mov r9, qword [rsp + 0x40]
lea r8, [0x140168960]
mov rcx, qword [rcx + 0x10]
mov edx, 0x12
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rsi
call fcn.140011464
mov rsi, qword [rsp + 0x50]
jmp 0x14012b28e
mov rsi, qword [rsp + 0x50]
inc rdi
cmp word [rsi + rdi*2], r15w
jne 0x14012b1be
mov rcx, qword [r12]
lea r9, [rsp + 0x48]
add edi, edi
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x14012b237
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14012b209
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x14012b28e
test byte [rcx + 0x1c], 1
je 0x14012b28e
cmp byte [rcx + 0x19], 2
jb 0x14012b28e
mov r9, qword [rsp + 0x40]
mov edx, 0x13
jmp 0x14012b135
cmp dword [rsp + 0x48], edi
je 0x14012b255
lea r8, str.dwBytesWritten__dwBytesToWrite
mov edx, 0x143
lea rcx, str.base_stor_blbengine_blbengutils_filelogger.cpp
call fcn.14008ac24
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x14012b28e
test byte [rcx + 0x1c], 1
je 0x14012b28e
cmp byte [rcx + 0x19], 5
jb 0x14012b28e
mov r9, qword [rsp + 0x40]
lea r8, [0x140168960]
mov rcx, qword [rcx + 0x10]
mov edx, 0x14
call fcn.1400112c8
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.140001d90
mov rbx, qword [rsp + 0x2d8]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret