Function at 0x46fb00
Capabilities:
Check if file exists
Check mutex on windows
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60fbac
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x69f000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x6c], 0
jne 0x46fb3d
xor al, al
jmp 0x46fdd3
lea eax, [esi + 0x4c]
push eax
lea ecx, [ebp - 0x288]
call fcn.0040bb80
mov dword [ebp - 4], 0
lea edi, [esi + 0x34]
cmp dword [ebp - 0x278], 0
jne 0x46fc91
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x28c], edi
jb 0x46fb77
mov eax, dword [edi]
mov dword [ebp - 0x28c], eax
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46fbfa
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.0040bb30
mov byte [ebp - 4], 1
lea eax, [ebp - 0x230]
xor bl, bl
cmp dword [ebp - 0x21c], 8
push 0
cmovae eax, dword [ebp - 0x230]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x46fbe1
cmp eax, 0xb7
je 0x46fbe1
cmp eax, 0x50
jne 0x46fbe3
mov bl, 1
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 0
call fcn.0040bd90
test bl, bl
je 0x46fca7
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.0040bb30
push dword [ebp - 0x28c]
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.0040bb30
lea edx, [ebp - 0x270]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x248]
call fcn.00471d00
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
mov bl, al
call fcn.0040bd90
test bl, bl
jne 0x46fc5b
lea ecx, [ebp - 0x248]
call fcn.0040bd90
jmp 0x46fdc6
lea eax, [ebp - 0x248]
lea ecx, [esi + 0x4c]
cmp ecx, eax
je 0x46fc82
cmp dword [ebp - 0x234], 8
push dword [ebp - 0x238]
cmovae eax, dword [ebp - 0x248]
push eax
call fcn.0040be20
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 0
call fcn.0040bd90
cmp dword [esi + 0x68], 0
lea ecx, [esi + 0x68]
jne 0x46fcae
mov eax, dword [esi]
push ecx
mov ecx, esi
mov eax, dword [eax]
call eax
test al, al
jne 0x46fcae
xor bl, bl
jmp 0x46fdc6
cmp dword [esi + 0x90], 0
jne 0x46fcdb
push 4
call fcn.00486cd6
add esp, 4
mov dword [ebp - 0x28c], eax
test eax, eax
je 0x46fcd3
mov dword [eax], 0
jmp 0x46fcd5
xor eax, eax
mov dword [esi + 0x90], eax
cmp dword [edi + 0x14], 8
jb 0x46fce3
mov edi, dword [edi]
push edi
lea ecx, [ebp - 0x230]
call fcn.0040bb30
mov edi, dword [esi + 0x90]
mov byte [ebp - 4], 4
cmp dword [edi], 0
jne 0x46fd4f
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov dword [edi], eax
test eax, eax
jne 0x46fd4f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 5
jne 0x46fd4f
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_OpenMutexW]
mov dword [edi], eax
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 0
call fcn.0040bd90
lea eax, [ebp - 0x258]
push eax
call fcn.005f0487
mov eax, dword [ebp - 0x254]
add esp, 4
mov ecx, dword [ebp - 0x258]
mov dword [esi + 0xb4], eax
mov dword [esi + 0xbc], eax
mov eax, dword [esi + 0x90]
mov dword [esi + 0xb0], ecx
mov dword [esi + 0xb8], ecx
mov eax, dword [eax]
test eax, eax
je 0x46fdc0
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x46fdc0
push ecx
mov ecx, esi
call fcn.00472120
mov eax, dword [esi + 0x90]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
mov byte [esi + 0x6d], 1
mov bl, 1
lea ecx, [ebp - 0x288]
call fcn.0040bd90
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005d077b
mov esp, ebp
pop ebp
ret