Function at 0x100146a0
Capabilities:
Check if file exists
Check mutex on windows
Get file attributes
Get file size
Write file on windows

Disassembly:
mov eax, 0x40a8
call fcn.10016a50
mov eax, dword [0x10032f68]
xor eax, esp
mov dword [esp + 0x40a4], eax
mov eax, dword [esp + 0x40b0]
push edi
mov edi, dword [esp + 0x40b0]
cmp eax, 0xffffffff
jne 0x100146e6
mov byte [edi + 4], 1
pop edi
mov ecx, dword [esp + 0x40a4]
xor ecx, esp
call fcn.100157eb
add esp, 0x40a8
ret
cmp eax, 0xfffffffe
jne 0x10014705
mov byte [edi + 4], 0
pop edi
mov ecx, dword [esp + 0x40a4]
xor ecx, esp
call fcn.100157eb
add esp, 0x40a8
ret
push ebx
xor ebx, ebx
cmp byte [edi + 4], bl
je 0x1001498e
cmp eax, ebx
je 0x1001498e
cmp dword [edi + 0x41c], 2
je 0x1001498e
mov eax, dword [edi + 0x420]
cmp eax, 2
je 0x1001498e
push ebp
lea ebp, [ebx + 1]
cmp eax, ebx
jne 0x10014743
mov dword [edi + 0x420], ebp
cmp dword [edi + 0x424], ebp
jge 0x1001498d
push 0x1ffe
lea ecx, [esp + 0x36]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x3c], ax
call fcn.10015800
push 0x207e
lea eax, [esp + 0x2042]
xor edx, edx
push ebx
push eax
mov word [esp + 0x2048], dx
call fcn.10015800
mov edx, dword [esp + 0x40d8]
add esp, 0x18
lea ecx, [esp + 0x40c4]
push ecx
push edx
push 0xfff
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.SHLWAPI.dll_wvnsprintfW]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x2c]
movzx ecx, word [esp + 0x2a]
lea edx, [esp + 0x30]
push edx
movzx edx, word [esp + 0x2c]
push eax
movzx eax, word [esp + 0x2e]
push ecx
movzx ecx, word [esp + 0x2e]
push edx
movzx edx, word [esp + 0x30]
push eax
push ecx
push edx
push str._04d__02d__02d__02d:_02d:_02d__s_r_n
lea eax, [esp + 0x2050]
push 0x103f
push eax
call fcn.1001627b
xor ecx, ecx
add esp, 0x28
mov word [esp + 0x40ae], cx
cmp dword [edi], ebx
jne 0x10014815
push str.LOCALLOG
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi], eax
cmp eax, ebx
je 0x10014851
mov edx, dword [edi]
push 0xbb8
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x10014851
mov eax, dword [edi]
add dword [edi + 0x424], ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop ebp
pop ebx
pop edi
mov ecx, dword [esp + 0x40a4]
xor ecx, esp
call fcn.100157eb
add esp, 0x40a8
ret
cmp word [edi + 6], bx
push esi
lea esi, [edi + 6]
jne 0x1001487a
mov ecx, dword [0x10034c64]
push ecx
lea edx, [edi + 0x210]
push esi
push edx
call fcn.10014540
add esp, 0xc
test al, al
je 0x1001497f
mov eax, dword [edi + 0x41c]
cmp eax, ebx
jne 0x100148b4
lea eax, [edi + 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100148a5
test al, 0x10
je 0x100148a5
mov dword [edi + 0x41c], ebp
jmp 0x1001497f
mov dword [edi + 0x41c], 2
jmp 0x1001497f
cmp eax, ebp
jne 0x1001497f
push ebx
push ebx
push 4
push ebx
push ebp
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001497f
lea ecx, [esp + 0x14]
push ecx
push esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
jl 0x10014919
jg 0x10014908
cmp eax, 0x800000
jbe 0x10014919
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
jmp 0x1001491d
or eax, ecx
jne 0x1001493b
push ebx
lea edx, [esp + 0x24]
push edx
push 2
lea eax, [esp + 0x1c]
push eax
push esi
mov byte [esp + 0x24], 0xff
mov byte [esp + 0x25], 0xfe
mov dword [esp + 0x34], ebx
call ebp
push 2
push ebx
push ebx
push esi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x2034]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10014954
sub eax, edx
push ebx
sar eax, 1
lea ecx, [esp + 0x20]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x2040]
push eax
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
cmp edi, ebx
je 0x1001498c
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop esi
pop ebp
mov ecx, dword [esp + 0x40ac]
pop ebx
pop edi
xor ecx, esp
call fcn.100157eb
add esp, 0x40a8
ret