Function at 0x140037e48
Capabilities:
Get file size
Read file on windows
Terminate process
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x14013bf40]
xor rax, rsp
mov qword [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__], rax
mov r10, rdx
mov rsi, rcx
mov dl, byte [rcx + 0x1b3]
mov rcx, r10
mov al, dl
neg al
sbb r8d, r8d
not r8d
and r8d, 3
neg dl
sbb edx, edx
xor r12d, r12d
and edx, 0x40000000
mov qword [rsp + 0x30], r12
add edx, 0x80000000
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140037f4a
cmp byte [rsi + 0x1b3], r12b
je 0x140037f1c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Fixup_could_not_open_file__Error__0x_X_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
xor eax, eax
mov rcx, qword [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
xor rcx, rsp
call fcn.14006e720
lea r11, [rsp + 0x4a0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r12
mov r8d, 0x400
lea rdx, [rbp - 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
mov ebx, dword [rsp + 0x40]
test eax, eax
je 0x14003851e
cmp ebx, 0x400
jb 0x14003851e
cmp byte [rsi + 0x1b2], r12b
je 0x1400381a3
lea rcx, str.Dumping_Logfile_Header_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov rax, qword [rbp + 0x100]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
nop dword [rax + rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
nop dword [rax + rax]
mov rax, qword [rbp + 8]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
nop dword [rax + rax]
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
nop dword [rax + rax]
movzx ecx, word [rsp + 0x7c]
movzx eax, word [rsp + 0x7e]
movzx r10d, word [rsp + 0x7a]
movzx r11d, word [rsp + 0x78]
movzx r9d, word [rsp + 0x70]
movzx r8d, word [rsp + 0x76]
movzx edx, word [rsp + 0x72]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
lea rcx, str._tStart_Time____02d__02d__04d__02d:_02d:_02d._03d_n
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp - 8]
lea rcx, str._tBufferSize____________d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp - 4]
lea rcx, str._tVersion_______________d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp]
lea rcx, str._tProviderVersion_______d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
movzx ecx, word [rbp - 0x74]
movzx eax, word [rbp - 0x72]
movzx r10d, word [rbp - 0x76]
movzx r11d, word [rbp - 0x78]
movzx r9d, word [rbp - 0x80]
movzx r8d, word [rbp - 0x7a]
movzx edx, word [rbp - 0x7e]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
lea rcx, str._tEnd_Time__02d__02d__04d__02d:_02d:_02d._03d_n
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp + 0x10]
lea rcx, str._tTimer_Resolution______d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp + 0x14]
lea rcx, str._tMaximum_File_Size_____d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp + 0x1c]
lea rcx, str._tBuffers__Written______d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov r8d, dword [rbp + 0x40]
lea rdx, [rbp + 0x44]
lea rcx, str._tTimezone_is__s__Bias_is__dmins__n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp + 0x18]
lea rcx, str._tLogfile_Mode__________X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov eax, dword [rbp + 0x18]
test eax, eax
jne 0x140038167
lea rcx, str.Logfile_is_off____n
jmp 0x140038181
cmp eax, 1
jne 0x140038175
lea rcx, str.Logfile_is_sequential_n
jmp 0x140038181
cmp eax, 2
jne 0x14003818d
lea rcx, str.Logfile_is_circular_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov edx, dword [rbp + 4]
lea rcx, str._tProcessorCount_________d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x1400381d0
lea rcx, str.WARNING:_Could_not_get_file_size__continuing_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
jmp 0x14003822e
mov rax, qword [rsp + 0x48]
cqo
and edx, 0xfffff
add rax, rdx
mov edx, dword [rbp + 0x14]
sar rax, 0x14
mov rbx, rax
cmp rax, rdx
jle 0x14003822e
mov r8, rax
lea rcx, str.WARNING:_File_size_given_as__dMB__should_be__I64dMB_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
cmp dword [rsp + 0x4c], r12d
je 0x14003821f
lea rcx, str.WARNING:_Log_file_is_TOO_big
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
cmp byte [rsi + 0x1b3], r12b
je 0x14003822e
lea eax, [rbx + 1]
mov dword [rbp + 0x14], eax
cmp dword [rbp + 0x18], 2
jne 0x1400383cc
cmp dword [rbp + 0x1c], r12d
jne 0x1400383cc
lea rcx, str.WARNING:_Circular_Trace_File_did_not_have_wrap_address_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
cmp byte [rsi + 0x1b3], r12b
je 0x140038505
cmp dword [rsp + 0x4c], r12d
je 0x14003828c
lea rcx, str.ERROR:_File_TOO_big_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
or ecx, 0xffffffff
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
mov ecx, dword [rbp - 8]
mov rax, qword [rsp + 0x48]
cqo
idiv rcx
lea rcx, str.MaxBuff_d_n
lea r14d, [rax - 1]
mov edx, r14d
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov ecx, dword [rbp - 8]
call qword [sym.imp.msvcrt.dll_malloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x140038306
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Could_not_allocate_memory__Error__0x_X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x14003836d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Could_not_reset_file_to_beginning_for_FixUp__Error__0x_X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
mov r15d, 1
cmp r14d, r15d
jl 0x1400383cc
mov edx, dword [rbp - 8]
mov r9d, 1
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x140038435
mov r8d, dword [rbp - 8]
lea r9, [rsp + 0x40]
mov rdx, rbx
mov qword [rsp + 0x20], r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
mov rcx, rbx
call fcn.140038560
inc r15d
cmp r15d, r14d
jle 0x140038378
cmp byte [rsi + 0x1b3], r12b
je 0x140038505
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x140038480
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Could_not_reset_file_to_beginning_for_FixUp__Error__0x_X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Could_not_set_file_to_next_buffer_for_FixUp__Error__0x_X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
mov eax, dword [rsi + 0x825c]
lea r9, [rsp + 0x40]
mov r8d, 0x400
mov dword [rbp + 0x1c], eax
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x20], r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x1400384ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
lea rcx, str.ERROR:_Could_not_Write_file_for_FixUp__Error__0x_X
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3
mov edx, dword [rsi + 0x825c]
lea rcx, str.INFO:_Buffer_Wrap_reset_to__d_n
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov eax, 1
jmp 0x140037f1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r9d, 0x400
lea rcx, str.ERROR:_Fixup_could_not_read_file__Error__0x_X__bytes_read___d_of__d__n
mov edx, eax
mov r8d, ebx
call qword [sym.imp.msvcrt.dll_wprintf]
nop dword [rax + rax]
mov ecx, 0xa0
call qword [sym.imp.msvcrt.dll_exit]
nop dword [rax + rax]
int3