Function at 0x409500
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54c00e
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x5b21b0]
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
mov dword [ebp - 0x244], esi
push 0x104
lea eax, [ebp - 0x22c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4098cf
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x4098cf
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x230], 0
push eax
lea ecx, [ebp - 0x230]
call fcn.00402c50
mov dword [ebp - 4], 0
call fcn.0040a6db
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4095a6
push 0x80004005
call fcn.00403540
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 1
call fcn.0040a6db
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4095d6
push 0x80004005
call fcn.00403540
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x238], eax
mov byte [ebp - 4], 2
call fcn.0040a6db
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x409606
push 0x80004005
call fcn.00403540
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x23c], eax
push str.BkavSkin.dll
add esi, 0xa4
mov byte [ebp - 4], 3
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 4
call fcn.00402ba0
mov byte [ebp - 4], 3
or ebx, 0xffffffff
mov edx, dword [ebp - 0x240]
mov eax, ebx
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40966b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.BkavSkinManager.dll
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 5
call fcn.00402ba0
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4096b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.SkinResource.dll
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 6
call fcn.00402ba0
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4096fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x234]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409735
mov edi, dword [ebp - 0x238]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409735
mov ebx, dword [ebp - 0x23c]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409831
or ebx, 0xffffffff
push str.BkavSkin.dll
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 7
call fcn.00402ba0
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409783
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.BkavSkinManager.dll
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 8
call fcn.00402ba0
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4097d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.SkinResource.dll
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00402a50
add esp, 0xc
push eax
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 9
call fcn.00402ba0
mov byte [ebp - 4], 3
mov ecx, ebx
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40981f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x23c]
mov edi, dword [ebp - 0x238]
mov esi, dword [ebp - 0x234]
mov eax, dword [ebp - 0x244]
test eax, eax
jne 0x40983f
xor ecx, ecx
jmp 0x409842
mov ecx, dword [eax + 0x20]
push ebx
push esi
push edi
push ecx
lea ecx, [eax + 0xa8]
call fcn.00403a90
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 2
or ebx, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409871
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 1
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40988e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4098ab
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x230]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4098cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.005322c6
mov esp, ebp
pop ebp
ret