Function at 0x100bea10
Capabilities:
Check if file exists
Check mutex on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f2ef6
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x1012d034]
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
mov dword [ebp - 0xac], edi
lea ebx, [edi + 0x18]
mov dword [ebp - 4], 1
mov ecx, ebx
mov dword [ebp - 0xa8], ebx
call fcn.100d5ff0
test al, al
je 0x100bea6b
push 0xffffffffffffffff
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push 0x100f980b
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
call fcn.100080d0
mov byte [ebp - 4], 2
cmp dword [edi + 0x14], 8
jb 0x100bea9a
mov edx, dword [edi]
jmp 0x100bea9c
mov edx, edi
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp word [edx], ax
jne 0x100beab9
xor ecx, ecx
jmp 0x100beacf
mov ecx, edx
lea esi, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100beac0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.10001e10
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.1003ad30
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov byte [ebp - 4], 2
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
setne al
cmp dword [ebp - 0x14], 8
mov byte [ebp - 0xa1], al
jb 0x100beb20
push dword [ebp - 0x28]
call ebx
mov al, byte [ebp - 0xa1]
add esp, 4
test al, al
je 0x100beccc
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xb4], esp
push 0x1010b428
call fcn.10001f10
mov byte [ebp - 4], 4
cmp dword [edi + 0x14], 8
jb 0x100beb49
mov edi, dword [edi]
sub esp, 0x18
mov ecx, esp
push edi
call fcn.10001f10
mov byte [ebp - 4], 2
call fcn.100b68b0
mov esi, eax
add esp, 0x30
mov dword [ebp - 0xb4], esi
test esi, esi
jne 0x100bebb0
mov esi, dword [ebp - 0xa8]
cmp dword [esi + 0x18], 8
lea eax, [esi + 4]
jb 0x100beb7d
mov eax, dword [eax]
push eax
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [esi], eax
test eax, eax
je 0x100beba4
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100beba4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0xa1], 0
jmp 0x100befce
push 2
push 0
push esi
call dword [sym.imp.MSVCR120.dll_fseek]
add esp, 0xc
push esi
call dword [sym.imp.MSVCR120.dll_ftell]
add esp, 4
mov edi, eax
push esi
call dword [sym.imp.MSVCR120.dll_rewind]
add esp, 4
lea esi, [edi + 1]
push esi
call fcn.100e0c76
add esp, 4
mov dword [ebp - 0xa8], eax
push esi
push 0
push eax
call sub.MSVCR120.dll_memset
mov esi, dword [ebp - 0xb4]
add esp, 0xc
push esi
push 1
push edi
push dword [ebp - 0xa8]
call dword [sym.imp.MSVCR120.dll_fread]
push esi
call dword [sym.imp.MSVCR120.dll_fclose]
mov esi, dword [ebp - 0xa8]
lea ecx, [ebp - 0x28]
add esp, 0x14
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
push edi
push esi
call fcn.100080d0
mov byte [ebp - 4], 5
test esi, esi
je 0x100bec46
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
sub esp, 0x18
lea eax, [ebp - 0x28]
mov ecx, esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.10007d40
lea eax, [ebp - 0x88]
push eax
call fcn.100bf4d0
mov esi, eax
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x100beca7
cmp dword [ebp - 0x2c], 0x10
jb 0x100bec8c
push dword [ebp - 0x40]
call ebx
add esp, 4
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
call fcn.100079f0
cmp dword [ebp - 0x74], 0x10
jb 0x100becb8
push dword [ebp - 0x88]
call ebx
add esp, 4
cmp dword [ebp - 0x14], 0x10
jb 0x100becc6
push dword [ebp - 0x28]
call ebx
add esp, 4
mov edi, dword [ebp - 0xac]
mov byte [ebp - 0xa1], 0
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
mov byte [ebp - 4], 6
cmp dword [ebp - 0x30], 0
je 0x100bef0c
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x44], 0xf
push eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
call fcn.10007d40
mov byte [ebp - 4], 7
cmp dword [ebp - 0x48], 0
je 0x100beedf
push 2
push 0
push 0x1010b430
lea ecx, [ebp - 0x58]
call fcn.10006c90
mov esi, eax
cmp esi, 0xffffffff
je 0x100beedf
push esi
push 0
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x58]
call fcn.10006a00
push 1
push 0
push 0x1010b434
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 8
call fcn.10006c90
push eax
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x88]
call fcn.10006a00
mov byte [ebp - 4], 9
lea ecx, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp - 0x28]
push dword [ebp + 0x18]
cmovae ecx, dword [ebp + 8]
cmp dword [ebp - 0x14], 0x10
push ecx
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
lea ecx, [ebp - 0x70]
push 0xffffffffffffffff
push 0
test eax, eax
jne 0x100bedee
lea eax, [ebp - 0x28]
push eax
call fcn.10007bd0
push 1
push 0x1010b438
lea ecx, [ebp - 0x70]
call fcn.10007a50
push 0xffffffffffffffff
push 0
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0x70]
call fcn.10007bd0
push 2
push 0x1010b43c
lea ecx, [ebp - 0x70]
call fcn.10007a50
mov byte [ebp - 0xa1], 1
jmp 0x100bee09
lea eax, [ebp - 0x88]
push eax
call fcn.10007bd0
push 2
push 0x1010b440
lea ecx, [ebp - 0x70]
call fcn.10007a50
push 0xffffffffffffffff
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x58]
call fcn.10006a00
mov esi, eax
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x100bee8c
cmp dword [ebp - 0x44], 0x10
jb 0x100bee35
push dword [ebp - 0x58]
call ebx
add esp, 4
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
cmp dword [esi + 0x14], 0x10
jae 0x100bee64
mov eax, dword [esi + 0x10]
inc eax
je 0x100bee6f
push eax
lea eax, [ebp - 0x58]
push esi
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x100bee6f
mov eax, dword [esi]
mov dword [ebp - 0x58], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x44], eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
cmp dword [ebp - 0x8c], 0x10
jb 0x100beea0
push dword [ebp - 0xa0]
call ebx
add esp, 4
cmp dword [ebp - 0x14], 0x10
jb 0x100beeae
push dword [ebp - 0x28]
call ebx
add esp, 4
mov byte [ebp - 4], 7
cmp dword [ebp - 0x74], 0x10
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jb 0x100beed5
push dword [ebp - 0x88]
call ebx
add esp, 4
cmp dword [ebp - 0x48], 0
jne 0x100bed23
mov byte [ebp - 4], 6
cmp dword [ebp - 0x44], 0x10
jb 0x100beef1
push dword [ebp - 0x58]
call ebx
add esp, 4
cmp byte [ebp - 0xa1], 0
je 0x100bef0c
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x40]
call fcn.10007d40
jmp 0x100bef4a
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x40]
call fcn.10007bd0
push 1
push 0x1010b444
lea ecx, [ebp - 0x40]
call fcn.10007a50
push 0xffffffffffffffff
push 0
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0x40]
call fcn.10007bd0
push 2
push 0x1010b448
lea ecx, [ebp - 0x40]
call fcn.10007a50
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.10007d40
mov ecx, edi
call fcn.100bf960
cmp dword [edi + 0x30], 8
mov byte [ebp - 0xa1], al
lea eax, [edi + 0x1c]
jb 0x100bef85
mov eax, dword [eax]
push eax
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [edi + 0x18], eax
test eax, eax
je 0x100befae
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100befae
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x5c], 0x10
jb 0x100befbc
push dword [ebp - 0x70]
call ebx
add esp, 4
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
cmp dword [ebp - 0x2c], 0x10
jb 0x100befdc
push dword [ebp - 0x40]
call ebx
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jb 0x100beffc
push dword [ebp + 8]
call ebx
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x100bf01c
push dword [ebp + 0x20]
call ebx
add esp, 4
mov al, byte [ebp - 0xa1]
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.100ebd7b
mov esp, ebp
pop ebp
ret 0x30