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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10241666
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x102e91c0]
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 edi, ecx
cmp byte [edi + 0x6c], 0
jne 0x101b582d
xor al, al
jmp 0x101b5ba4
lea esi, [edi + 0x4c]
push esi
lea ecx, [ebp - 0x258]
call fcn.1000fe90
mov dword [ebp - 4], 0
lea ebx, [edi + 0x34]
cmp dword [ebp - 0x248], 0
jne 0x101b5a0e
cmp dword [ebx + 0x14], 8
jb 0x101b585b
mov ebx, dword [ebx]
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 0x101b590e
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x264], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x260], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101b58a0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x274]
call fcn.1000aef0
cmp dword [ebp - 0x260], 8
lea eax, [ebp - 0x274]
push 0
cmovae eax, dword [ebp - 0x274]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x101b5903
cmp eax, 0xb7
je 0x101b5903
cmp eax, 0x50
je 0x101b5903
lea ecx, [ebp - 0x274]
call fcn.1000ae90
xor bl, bl
jmp 0x101b5b97
lea ecx, [ebp - 0x274]
call fcn.1000ae90
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x21c], 0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101b5935
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.1000aef0
mov ecx, ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x278], 0
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101b5980
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x28c]
call fcn.1000aef0
lea edx, [ebp - 0x28c]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x230]
call fcn.101bc960
lea ecx, [ebp - 0x28c]
mov byte [ebp - 4], 1
mov bl, al
call fcn.1000ae90
test bl, bl
jne 0x101b59d6
lea ecx, [ebp - 0x230]
call fcn.1000ae90
jmp 0x101b5b97
lea eax, [ebp - 0x230]
cmp esi, eax
je 0x101b59fc
cmp dword [ebp - 0x21c], 8
mov ecx, esi
push dword [ebp - 0x220]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.10010360
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 0
call fcn.1000ae90
lea ebx, [edi + 0x34]
cmp dword [edi + 0x68], 0
lea ecx, [edi + 0x68]
jne 0x101b5a33
mov eax, dword [edi]
push ecx
mov esi, dword [eax]
mov ecx, esi
call dword [0x1024852c]
mov ecx, edi
call esi
test al, al
jne 0x101b5a33
xor bl, bl
jmp 0x101b5b97
cmp dword [edi + 0x90], 0
jne 0x101b5a5e
push 4
call fcn.101cff73
add esp, 4
mov dword [ebp - 0x25c], eax
mov dword [eax], 0
mov dword [eax], 0
mov dword [edi + 0x90], eax
cmp dword [ebx + 0x14], 8
jb 0x101b5a66
mov ebx, dword [ebx]
mov ecx, ebx
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101b5a90
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x230]
call fcn.1000aef0
mov esi, dword [edi + 0x90]
cmp dword [esi], 0
jne 0x101b5b08
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 [esi], eax
test eax, eax
jne 0x101b5b08
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x101b5b08
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 [esi], eax
lea ecx, [ebp - 0x230]
call fcn.1000ae90
lea eax, [ebp - 0x240]
push eax
call fcn.101ed9b0
mov ecx, dword [ebp - 0x240]
add esp, 4
cmp byte [edi + 0xd1], 0
mov eax, dword [ebp - 0x23c]
mov dword [edi + 0xf0], ecx
mov dword [edi + 0xf4], eax
mov dword [edi + 0xf8], ecx
mov dword [edi + 0xfc], eax
je 0x101b5b8a
mov eax, dword [edi + 0x90]
mov eax, dword [eax]
test eax, eax
je 0x101b5b8a
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x101b5b72
cmp eax, 0x80
jne 0x101b5b8a
push ecx
mov ecx, edi
call fcn.101bce40
mov eax, dword [edi + 0x90]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x101b5b91
mov byte [edi + 0xd1], 0
mov byte [edi + 0x6d], 1
mov bl, 1
lea ecx, [ebp - 0x258]
call fcn.1000ae90
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.101cff65
mov esp, ebp
pop ebp
ret