Function at 0x100b7f20
Capabilities:
Check if file exists
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101c07c5
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x101d32d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x20], eax
cmp byte [eax + 0xc], 0
jne 0x100b81c9
mov ecx, dword [eax + 8]
lea edi, [eax + 8]
sub ecx, 0x10
mov dword [ebp - 0x18], edi
call fcn.1005b540
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
mov ebx, 1
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x100b7f9d
push 0x104
lea ecx, [ebp - 0x10]
call fcn.1003f1f0
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x100b7fdc
test esi, esi
jne 0x100b7fb0
xor ecx, ecx
jmp 0x100b7fca
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100b7fb5
sub ecx, edx
sar ecx, 1
js 0x100b8164
cmp ecx, dword [esi - 8]
jg 0x100b8164
xor eax, eax
mov dword [esi - 0xc], ecx
mov word [esi + ecx*2], ax
cmp dword [esi - 0xc], 0
je 0x100b7fed
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100b806b
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x100b800e
push 0x104
lea ecx, [ebp - 0x10]
call fcn.1003f1f0
mov esi, dword [ebp - 0x10]
push esi
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPath2W]
test eax, eax
je 0x100b8025
cmp eax, 0x104
jbe 0x100b8037
push 1
push 0x1001cc90
lea ecx, [ebp - 0x10]
call fcn.1003f2f0
mov esi, dword [ebp - 0x10]
test esi, esi
jne 0x100b803f
xor ecx, ecx
jmp 0x100b8059
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100b8044
sub ecx, edx
sar ecx, 1
js 0x100b8164
cmp ecx, dword [esi - 8]
jg 0x100b8164
xor eax, eax
mov dword [esi - 0xc], ecx
mov word [esi + ecx*2], ax
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.1005b540
mov dword [ebp - 0x1c], eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
push 0x5c
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x100b8115
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x100b8115
mov edx, dword [ebp - 0x1c]
lea ebx, [eax + 1]
mov edx, dword [edx + 4]
mov ecx, edx
test ebx, ebx
jns 0x100b80b2
xor ebx, ebx
jmp 0x100b80bf
mov eax, SysReAllocString
sub eax, ebx
js 0x100b8164
cmp ebx, ecx
jle 0x100b80c5
mov ebx, edx
test ebx, ebx
jle 0x100b8110
sub ecx, ebx
cmp dword [edi - 4], 1
mov dword [ebp - 0x1c], ecx
jle 0x100b80e5
push dword [edi - 0xc]
lea ecx, [ebp - 0x14]
call fcn.1003f0d0
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx*2 + 2]
mov ecx, edi
push edx
lea eax, [edi + ebx*2]
push eax
call fcn.1003eb90
mov eax, dword [ebp - 0x1c]
add esp, 8
test eax, eax
js 0x100b8164
cmp eax, dword [edi - 8]
jg 0x100b8164
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ebx, 1
cmp dword [edi - 0xc], 0
jne 0x100b812d
push 3
push 0x1001cc94
lea ecx, [ebp - 0x14]
call fcn.1003f2f0
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
sub ebx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or ebx, eax
jge 0x100b814e
push 0x104
call fcn.1003f1f0
mov ecx, dword [ebp - 0x18]
push dword [ecx]
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x100b816f
call dword [sym.imp.PhotoBase.dll_void___stdcall_Base::ThrowLastError_void_]
push 0x80070057
call dword [sym.imp.PhotoBase.dll_void___stdcall_ATL::BaseAtlThrow_long_int_]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.100b7ed0
mov eax, dword [ebp - 0x20]
or ecx, 0xffffffff
add edi, 0xfffffff0
mov byte [eax + 0xc], 1
mov eax, ecx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100b81a8
mov ebx, dword [edi]
push edi
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x101d83dc]
mov ecx, ebx
call edi
or ecx, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x100b81c9
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x101d83dc]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret