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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101bae80
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x101cc284]
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 eax, ecx
mov dword [ebp - 0x24], eax
cmp byte [eax + 0xc], 0
jne 0x100b9361
mov ecx, dword [eax + 8]
lea ebx, [eax + 8]
sub ecx, 0x10
mov dword [ebp - 0x20], ebx
call fcn.1005e500
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov edi, 1
mov eax, dword [esi - 8]
mov ecx, edi
sub ecx, dword [esi - 4]
sub eax, 0x104
or ecx, eax
jge 0x100b9110
push 0x104
lea ecx, [ebp - 0x14]
call fcn.10042660
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x100b914f
test esi, esi
jne 0x100b9123
xor ecx, ecx
jmp 0x100b9141
mov ecx, esi
lea edx, [ecx + 2]
jmp 0x100b9130
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100b9130
sub ecx, edx
sar ecx, 1
js 0x100b91b6
cmp ecx, dword [esi - 8]
jg 0x100b91b6
xor eax, eax
mov dword [esi - 0xc], ecx
mov word [esi + ecx*2], ax
cmp dword [esi - 0xc], 0
je 0x100b9164
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100b91e5
mov eax, dword [esi - 8]
mov ecx, edi
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x100b9185
push 0x104
lea ecx, [ebp - 0x14]
call fcn.10042660
mov esi, dword [ebp - 0x14]
push esi
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x100b919c
cmp eax, 0x104
jbe 0x100b91ae
push 1
push 0x100209a0
lea ecx, [ebp - 0x14]
call fcn.100426c0
mov esi, dword [ebp - 0x14]
test esi, esi
jne 0x100b91c1
xor ecx, ecx
jmp 0x100b91d7
push 0x80070057
call dword [sym.imp.PhotoBase.dll_void___stdcall_ATL::BaseAtlThrow_long_int_]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100b91c6
sub ecx, edx
sar ecx, 1
js 0x100b91b6
cmp ecx, dword [esi - 8]
jg 0x100b91b6
xor eax, eax
mov dword [esi - 0xc], ecx
mov word [esi + ecx*2], ax
mov ecx, dword [ebx]
sub ecx, 0x10
call fcn.1005e500
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
push 0x5c
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.msvcrt.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x100b92ac
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x100b92ac
xor ebx, ebx
mov ecx, SysReAllocString
add eax, 1
sets bl
dec ebx
and ebx, eax
mov eax, dword [edi - 0xc]
sub ecx, ebx
mov edx, ebx
jns 0x100b9236
mov edx, dword [ebp - 0x24]
sar ecx, 0x1f
and ecx, 0x80070057
jge 0x100b9248
push ecx
call dword [sym.imp.PhotoBase.dll_void___stdcall_ATL::BaseAtlThrow_long_int_]
cmp edx, eax
jle 0x100b924e
mov ebx, eax
test ebx, ebx
jle 0x100b92a9
sub eax, ebx
cmp dword [edi - 4], 1
mov dword [ebp - 0x1c], eax
jle 0x100b926e
push dword [edi - 0xc]
lea ecx, [ebp - 0x18]
call fcn.10042520
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
lea ecx, [eax*2 + 2]
push ecx
lea eax, [edi + ebx*2]
push eax
push ecx
push edi
call dword [sym.imp.msvcrt.dll_memmove_s]
add esp, 0x10
mov ecx, eax
call fcn.100422b0
mov eax, dword [ebp - 0x1c]
test eax, eax
js 0x100b91b6
cmp eax, dword [edi - 8]
jg 0x100b91b6
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ebx, dword [ebp - 0x20]
cmp dword [edi - 0xc], 0
jne 0x100b92c4
push 3
push 0x100209a4
lea ecx, [ebp - 0x18]
call fcn.100426c0
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebx]
mov edx, 1
mov eax, dword [ecx - 8]
sub edx, dword [ecx - 4]
sub eax, 0x104
or edx, eax
jge 0x100b92e8
push 0x104
mov ecx, ebx
call fcn.10042660
mov ecx, dword [ebx]
push ecx
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x100b92fd
call dword [sym.imp.PhotoBase.dll_void___stdcall_Base::ThrowLastError_void_]
push ecx
mov ecx, ebx
call fcn.100b9040
mov eax, dword [ebp - 0x24]
or ecx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov byte [eax + 0xc], 1
mov eax, ecx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100b9339
mov ebx, dword [edi]
push edi
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x101d13b0]
mov ecx, ebx
call edi
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x100b9361
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x101d13b0]
mov ecx, edi
call esi
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.101b6170
mov esp, ebp
pop ebp
ret