Function at 0x407a5f
Capabilities:
Check mutex on windows
Create directory
Get common file path
Get file size
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x4150b4]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x128], eax
mov eax, 0xf003f
cmp dword [ebp + 8], eax
push ebx
mov ebx, dword [ebp + 0xc]
je 0x407a91
mov eax, dword [ebp + 8]
and eax, 0x2001f
sub eax, 0x20006
je 0x407ac6
sub eax, 0x13
je 0x407ab0
sub eax, 6
je 0x407ac6
sub eax, 0xd0020
je 0x407ac6
xor eax, eax
jmp 0x407cb3
mov dword [ebp - 0x110], 3
mov dword [ebp - 0x10c], 0x80000000
jmp 0x407ada
mov dword [ebp - 0x110], 4
mov dword [ebp - 0x10c], 0xc0000000
push esi
push edi
push 0x41
pop ecx
xor eax, eax
push 1
lea edi, [ebp - 0x108]
rep stosd dword es:[edi], eax
push 0x23
lea eax, [ebp - 0x108]
push eax
xor esi, esi
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x407cfe
push str.EPSON
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.00407200
test eax, eax
jne 0x407cfe
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
lea eax, [ebp - 0x108]
push eax
call edi
test eax, eax
jne 0x407b48
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407cfe
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x11c], esi
lea eax, [ebp - 0x13c]
lea esi, [ebp - 0x124]
mov dword [ebp - 0x124], 0xc
mov dword [ebp - 0x120], eax
call fcn.00406f0c
test eax, eax
je 0x407cfe
push str.PRINTER
mov esi, 0x104
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.00407200
test eax, eax
jne 0x407cfe
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x108]
push eax
call edi
test eax, eax
jne 0x407bd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407be6
lea esi, [ebp - 0x124]
call fcn.00407058
jmp 0x407cfe
push 2
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x407bc3
push str.EPAUDF01.AUD
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.00407200
test eax, eax
jne 0x407bc3
push str.GlobalEPMUTEX_EPAUDFSR0105_EPAUDF01
xor edi, edi
push edi
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, edi
mov dword [ebx], eax
je 0x407bc3
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x407c44
lea esi, [ebp - 0x124]
call fcn.00407058
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], edi
jmp 0x407cfe
push edi
push 2
push dword [ebp - 0x110]
lea eax, [ebp - 0x124]
push eax
push edi
push dword [ebp - 0x10c]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10c], eax
lea esi, [ebp - 0x124]
jne 0x407c88
call fcn.00407058
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x407c35
call fcn.00407058
cmp dword [ebp - 0x110], 4
jne 0x407cc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407cc0
mov eax, dword [ebp - 0x128]
mov dword [eax], edi
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.00409941
leave
ret 0xc
push edi
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, edi
mov ecx, dword [ebp - 0x128]
mov dword [ecx], eax
jne 0x407cab
cmp dword [ebp + 8], 0x20019
jne 0x407cab
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10c]
mov dword [ebx], edi
call esi
xor eax, eax
jmp 0x407cb1