Function at 0x47eed9
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, 0x24c
mov eax, dword [0x4a0fe0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
cmp ecx, ebx
push esi
push edi
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x210], edx
je 0x47f33a
cmp eax, ebx
je 0x47f33a
mov eax, 0xf003f
cmp dword [ebp + 8], eax
je 0x47ef2a
mov eax, dword [ebp + 8]
and eax, 0x2001f
sub eax, 0x20006
je 0x47ef4a
sub eax, 0x13
je 0x47efec
sub eax, 6
je 0x47ef4a
sub eax, 0xd0020
jne 0x47f33a
mov dword [ebp - 0x21c], 0xc0000000
mov dword [ebp - 0x218], 4
lea eax, [ebp - 0x24c]
lea esi, [ebp - 0x238]
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x238], 0xc
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x234], eax
call fcn.0047e863
test eax, eax
je 0x47f33a
mov esi, dword [ebp - 0x210]
cmp esi, ebx
mov edi, 0x104
je 0x47f0e0
cmp dword [ebp + 0x10], ebx
je 0x47f0e0
cmp dword [ebp + 0x10], 2
jne 0x47f065
mov ecx, str.EPAUDF01.AUD
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x47f005
cmp dx, bx
je 0x47efe8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x47f005
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x47efc6
xor eax, eax
jmp 0x47f00a
mov dword [ebp - 0x218], 3
mov dword [ebp - 0x21c], SysReAllocString
jmp 0x47ef5e
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x47f01b
push str.GlobalEPMUTEX_EPAUDFSR0105_EPAUDF01
lea eax, [ebp - 0x20c]
jmp 0x47f05c
mov ecx, str.EPAUDL01.AUD
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x47f048
cmp dx, bx
je 0x47f044
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x47f048
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x47f022
xor eax, eax
jmp 0x47f04d
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
lea eax, [ebp - 0x20c]
jne 0x47f0ae
push str.GlobalEPMUTEX_EPAUDFSR0105_EPAUDL01
push edi
push eax
call fcn.0047eb0c
jmp 0x47f0c3
push 0x5c
push esi
mov dword [ebp - 0x220], ebx
call fcn.0046fb2a
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x47f0c7
lea eax, [ebp - 0x220]
push eax
push edi
push dword [ebp - 0x210]
inc esi
inc esi
call fcn.0047ec21
cmp eax, ebx
jl 0x47f0c7
mov ecx, dword [ebp - 0x220]
mov eax, esi
sub eax, dword [ebp - 0x210]
shr eax, 1
sub ecx, eax
je 0x47f0c7
lea eax, [ebp - 0x20c]
push esi
push str.GlobalEPMUTEX_EPAUDFSR0105_
push 0x498468
push edi
push eax
call fcn.0047ebc6
add esp, 0x14
cmp eax, ebx
jge 0x47f0d7
lea esi, [ebp - 0x238]
call fcn.0047e9b3
jmp 0x47f33a
lea eax, [ebp - 0x20c]
push eax
jmp 0x47f0e5
push str.GlobalEPMUTEX_EPAUDFSR0105_EPAUDF01
push ebx
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ecx, dword [ebp - 0x214]
mov dword [ecx], eax
mov eax, ecx
mov eax, dword [eax]
cmp eax, ebx
je 0x47f0c7
push 0x186a0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x47f31f
cmp eax, 0xffffffff
je 0x47f31f
push 0x208
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0046e670
add esp, 0xc
cmp dword [ebp - 0x210], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x47f16c
cmp dword [ebp + 0x10], 1
jne 0x47f16c
push dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0047eb0c
test eax, eax
jl 0x47f2f4
jmp 0x47f261
push 1
push 0x23
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x47f2f4
push str.EPSON
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0047eb8a
test eax, eax
jne 0x47f2f4
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push eax
lea eax, [ebp - 0x20c]
push eax
call esi
test eax, eax
jne 0x47f1c2
call ebx
cmp eax, 0xb7
jne 0x47f2f4
push str.PRINTER
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0047eb8a
test eax, eax
jne 0x47f2f4
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x20c]
push eax
call esi
test eax, eax
jne 0x47f1ff
call ebx
cmp eax, 0xb7
jne 0x47f2f4
jmp 0x47f216
push 2
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x47f2f4
cmp dword [ebp - 0x210], 0
je 0x47f247
cmp dword [ebp + 0x10], 2
jne 0x47f247
push 0x498464
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0047eb8a
test eax, eax
jne 0x47f2f4
push dword [ebp - 0x210]
jmp 0x47f24c
push 0x48e61c
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0047eb8a
test eax, eax
jne 0x47f2f4
push 0xa
pop esi
push 0
push 2
push dword [ebp - 0x218]
lea eax, [ebp - 0x238]
push eax
push 1
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x47f2a5
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 0xa
cmp esi, 0xd2
jb 0x47f264
jmp 0x47f2f4
cmp dword [ebp - 0x218], 4
jne 0x47f2cf
call ebx
cmp eax, 0xb7
je 0x47f2cf
mov eax, dword [ebp - 0x224]
and dword [eax], 0
lea esi, [ebp - 0x238]
call fcn.0047e9b3
mov eax, edi
jmp 0x47f33c
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov ecx, dword [ebp - 0x224]
mov dword [ecx], eax
jne 0x47f2c0
cmp dword [ebp + 8], 0x20019
jne 0x47f2c0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [ebp - 0x238]
call fcn.0047e9b3
mov esi, dword [ebp - 0x214]
mov eax, dword [esi]
test eax, eax
je 0x47f33a
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi], 0
jmp 0x47f33a
lea esi, [ebp - 0x238]
call fcn.0047e9b3
mov esi, dword [ebp - 0x214]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], ebx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046d626
leave
ret 0xc