Function at 0x180002490
Capabilities:
Get file size
Print debug messages
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
push r14
push r15
mov eax, 0x1730
call fcn.180056f80
sub rsp, rax
mov rax, qword [0x1800a2de8]
xor rax, rsp
mov qword [rsp + 0x1720], rax
mov qword [rsp + 0x60], rsp
mov r15, rdx
mov rsi, rcx
xor r12d, r12d
mov word [rsp + 0xa8], r12w
xor eax, eax
mov qword [rsp + 0xaa], rax
mov dword [rsp + 0xb2], eax
mov word [rsp + 0xb6], ax
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x80], rdi
mov dword [rsp + 0x50], r12d
lea ebx, [rax + 0x32]
mov dword [rsp + 0x54], r12d
mov qword [rsp + 0x78], r12
mov dword [rsp + 0x6c], 0x140003
mov qword [rsp + 0x88], r12
call fcn.1800018e0
cmp eax, 1
je 0x18000252b
xor eax, eax
jmp 0x180002b41
lea rcx, [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rcx, [rsp + 0xc0]
cmp word [0x1800a6d20], 0
jne 0x18000255e
lea r8, str.mbae_default.log
mov edx, 0x104
call fcn.180054b48
jmp 0x180002578
lea r9, str.mbae_default.log
lea r8, [0x1800a6d20]
lea rdx, str._s_s
call fcn.180003d50
movzx eax, word [rsp + 0xb4]
movzx ecx, word [rsp + 0xb2]
movzx edx, word [rsp + 0xb0]
movzx r10d, word [rsp + 0xae]
movzx r11d, word [rsp + 0xaa]
movzx r9d, word [rsp + 0xa8]
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
mov r8, rsi
lea rdx, str._s__04d__02d__02d____02d:_02d:_02d____s_r_n
lea rcx, [rsp + 0x2d0]
call fcn.180003db0
nop dword [rax]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
lea edx, [r9 + 4]
lea r8d, [r9 + 1]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
mov qword [rsp + 0x80], rax
cmp rax, 0xffffffffffffffff
jne 0x180002637
lea rcx, str.Retry_log_file_open_from_dll_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rsi, 0xffffffffffffffff
jne 0x18000272b
mov ecx, ebx
dec ebx
mov dword [rsp + 0xa4], ebx
test ecx, ecx
jne 0x1800025e0
cmp rsi, rsi
jne 0x18000272b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [rax + 0x1e]
mov dword [rsp + 0x58], esi
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [rax + 0x1e]
mov ecx, 0x1000a
call fcn.180053ad4
mov rbx, rax
test rax, rax
jne 0x18000269c
lea rcx, str.Memory_allocation_error_in_log_file_n
call fcn.180053f50
lea rcx, str.Memory_allocation_error_in_log_file_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x180002707
lea r8, [0x180088a64]
mov edx, 0xffff
mov rcx, rax
call fcn.180053a70
test eax, eax
jle 0x1800026e4
mov byte [rbx + 0xffff], 0
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
lea r9, str.MbaeBasicLog
mov edx, 0x156
mov r8d, 1
lea rcx, str.....mbae_commonMbaeLog.cpp
call fcn.180001b40
jmp 0x1800026ff
mov edx, edi
lea rcx, str.Error__d_in_swprintf_s_n
call fcn.180053f50
lea rcx, str.Error_in_swprintf_s_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rbx
call fcn.180053a94
mov dword [rsp + 0x9c], esi
lea rdx, [0x180002722]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, dword [rsp + 0x58]
jmp 0x180002b41
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1800027e5
cmp qword [rsp + 0x78], 0
jne 0x1800027e5
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov r8d, 4
lea rdx, [rsp + 0x6c]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180002776
cmp dword [rsp + 0x50], 4
je 0x1800027e5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov eax, dword [rsp + 0x54]
dec eax
movsxd rdx, eax
lea r8, str.Error__d_writting_the_log_file_header_n
lea rcx, [rsp + 0x2d0]
call fcn.180053a4c
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rdx, [rsp + 0x2d0]
lea rcx, [0x18008890c]
call fcn.180053f50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rdx, [0x1800027dc]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, dword [rsp + 0x70]
jmp 0x180002b41
lea rax, [rsp + 0x2d0]
mov rbx, rdi
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1800027f0
mov dword [rsp + 0x54], ebx
lea eax, [rbx + 0x14]
movsxd rcx, eax
call fcn.180053ad4
mov r14, rax
test rax, rax
jne 0x180002856
mov edx, ebx
lea rcx, str.Memory_allocation_error_in_log_file:__d_n
call fcn.180053f50
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [rsp + 0x90], 5
lea rdx, [0x18000284c]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, 5
jmp 0x180002b41
lea eax, [rbx + 1]
movsxd r8, eax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x2d0]
mov rdx, r14
lea rcx, [rsp + 0x88]
call fcn.180054798
mov ebx, eax
mov dword [rsp + 0x58], eax
test eax, eax
je 0x1800028c2
mov r8d, eax
mov rdx, r15
lea rcx, str.wcstombs_s_error_in_log_file:__s____d_n
call fcn.180053f50
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [rsp + 0x94], ebx
lea rdx, [0x1800028b9]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, dword [rsp + 0x58]
jmp 0x180002b41
inc rdi
cmp byte [r14 + rdi], 0
jne 0x1800028c2
mov qword [rsp + 0x88], rdi
test rdi, rdi
jne 0x180002902
mov dword [rsp + 0x98], 8
lea rdx, [0x1800028f8]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, 8
jmp 0x180002b41
mov rcx, r14
call fcn.180002b70
movsxd rbx, eax
mov eax, dword [rsp + 0x54]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp ebx, eax
jge 0x180002947
mov dword [rsp + 0xa0], 8
lea rdx, [0x18000293d]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, 8
jmp 0x180002b41
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov r8d, 4
lea rdx, [rsp + 0x54]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180002a2a
cmp dword [rsp + 0x50], 4
jne 0x180002a2a
lea r8d, [rbx*8]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1800029b8
mov rcx, rbx
shl rcx, 3
mov eax, dword [rsp + 0x50]
cmp rax, rcx
jne 0x1800029b8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180002524
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov dword [rsp + 0x20], ebx
lea r8, [rsp + 0xc0]
lea rdx, str.Error_writting_the_log_file:__s____d____d_n
lea rcx, [rsp + 0x2d0]
call fcn.180003db0
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rdx, [rsp + 0x2d0]
lea rcx, [0x18008890c]
call fcn.180053f50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rdx, [0x180002a21]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, dword [rsp + 0x68]
jmp 0x180002b41
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov dword [rsp + 0x20], ebx
lea r8, [rsp + 0xc0]
lea rdx, str.Error_writting_the_log_file:__s____d____d_n
lea rcx, [rsp + 0x2d0]
call fcn.180003db0
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rdx, [rsp + 0x2d0]
lea rcx, [0x18008890c]
call fcn.180053f50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x74], eax
lea rdx, [0x180002a93]
mov rcx, qword [rsp + 0x60]
call fcn.180057580
nop
nop
nop
mov eax, dword [rsp + 0x74]
jmp 0x180002b41
mov rcx, qword [rsp + 0x1720]
xor rcx, rsp
call fcn.180052be0
mov rbx, qword [rsp + 0x1770]
add rsp, 0x1730
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret