Function at 0x410a00
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1224
call fcn.00415f70
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x121c], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1238]
mov ebp, ecx
test edi, edi
jne 0x410a42
push str.Log_file_name_is_not_specified.
push 3
push 0x429048
call fcn.00404d90
lea eax, [edi + 1]
jmp 0x410cdc
lea eax, [ebp + 0xe3cc]
xor esi, esi
mov dword [esp + 0x14], eax
mov ebx, 0x100000
mov eax, dword [ebp + 0xe808]
cmp dword [esp + 0x123c], ebx
push 0x208
cmovbe ebx, dword [esp + 0x1240]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x24]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 0x2def8]
add esp, 0xc
cmp eax, 2
je 0x410a8f
cmp eax, 1
jne 0x410ad6
mov eax, dword [esp + 0x10]
test eax, eax
je 0x410ad6
cmp word [eax], si
lea eax, [ebp + 0xe3cc]
je 0x410adc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
mov eax, dword [esp + 0x14]
push eax
push 0x104
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchCombine]
test eax, eax
lea ecx, [esp + 0x20]
lea eax, [ebp + 0xe3cc]
cmovs ecx, eax
mov eax, ecx
mov dword [esp + 0x14], eax
jmp 0x410adc
lea eax, [ebp + 0xe3cc]
push eax
push str.Start_generating_log_tail_file:__s
push 3
push 0x429048
call fcn.00404d90
add esp, 0x10
lea eax, [ebp + 0x29a80]
mov ecx, ebp
mov dword [esp + 0x1c], eax
push 0
push eax
push str..log
push dword [esp + 0x20]
call fcn.00410200
test eax, eax
je 0x410cac
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x410c8e
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x410c65
cmp eax, ebx
jbe 0x410b6c
push 2
push 0
mov eax, ebx
neg eax
push eax
push ebp
lfence
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x410c65
mov edi, dword [esp + 0x1c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x410c56
xor edi, edi
mov esi, 1
test ebx, ebx
je 0x410c46
lfence
mov ecx, 0x1000
nop dword [eax]
cmp esi, 1
jne 0x410c27
mov eax, ebx
mov dword [esp + 0x10], 0
sub eax, edi
cmp eax, 0x1000
push 0
cmova eax, ecx
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [esp + 0x234]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
je 0x410c2b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x410c46
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push eax
lea eax, [esp + 0x234]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jne 0x410c52
add edi, eax
mov ecx, 0x1000
cmp ebx, edi
ja 0x410bb0
test esi, esi
jne 0x410c46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FileCopy:_Unable_to_read_write_file__error__d
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410c81
xor esi, esi
jmp 0x410c2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Unable_to_open_file__s_for_write__error__d
jmp 0x410c72
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Unable_to_set_position_in_file__s__error__d
push 1
push 0x429048
call fcn.00404d90
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x410cc9
jmp 0x410cc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Unable_to_open_file__s__error__d
push 1
push 0x429048
call fcn.00404d90
add esp, 0x14
jmp 0x410cc0
push str.Unable_to_construct_name_for_temporary_log_file
push 1
push 0x429048
call fcn.00404d90
add esp, 0xc
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov word [eax], cx
push str.Finished_generating_log_file_tail.
push 3
push 0x429048
call fcn.00404d90
mov eax, esi
mov ecx, dword [esp + 0x1238]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414600
add esp, 0x1224
ret 8