Function at 0x478360
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d1da1
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push esi
push edi
mov eax, dword [0x50397c]
xor eax, esp
push eax
lea eax, [esp + 0xa8]
mov dword fs:[0], eax
mov eax, dword [0x50c48c]
mov edx, dword [eax + 0xc]
mov ecx, 0x50c48c
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0xb4], 0
call fcn.004291c0
add esp, 4
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 1
call fcn.00406aa0
mov byte [esp + 0xb0], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4783f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x47842c
lea ecx, [eax - 1]
test ecx, ecx
jl 0x47872b
cmp ecx, eax
jg 0x47872b
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x47842c
push 0x5c
lea edi, [esp + 0x18]
call fcn.00406b00
push 7
push 0x4f02e8
lea ecx, [esp + 0x1c]
push ecx
call fcn.004092d0
mov edx, dword [esp + 0x14]
push edx
call dword [0x4d5364]
test eax, eax
jne 0x4784d6
lea ebx, [esp + 0x18]
call fcn.00428ed0
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 2
call fcn.00406aa0
mov byte [esp + 0xb0], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x478492
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4784c5
lea eax, [ecx - 1]
test eax, eax
jl 0x47872b
cmp eax, ecx
jg 0x47872b
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x4784c5
push 0x5c
lea edi, [esp + 0x18]
call fcn.00406b00
push 7
push 0x4f02e8
lea ecx, [esp + 0x1c]
push ecx
call fcn.004092d0
lea edx, [esp + 0x34]
push edx
xor edi, edi
call fcn.0042db10
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x2c]
mov byte [esp + 0xb0], 3
mov ecx, dword [esp + 0x14]
push eax
lea edx, [esp + 0x38]
call fcn.0042df50
test eax, eax
je 0x4787aa
mov eax, dword [0x50c48c]
mov edx, dword [eax + 0xc]
mov ecx, 0x50c48c
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
mov byte [esp + 0xb0], 4
mov eax, dword [0x50c48c]
mov edx, dword [eax + 0xc]
mov ecx, 0x50c48c
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xb4], 5
call fcn.0042db10
push str.DefaultVersion
xor eax, eax
mov byte [esp + 0xb4], 6
push str.Properties
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
call fcn.0042e4e0
lea edx, [esp + 0x24]
push edx
mov edi, eax
push str.Default
lea eax, [esp + 0x3c]
push eax
call fcn.0042e2d0
test eax, eax
je 0x4785a0
cmp edi, 0x4b6
ja 0x478655
lea ebx, [esp + 0x20]
call fcn.00428ed0
lea edi, [esp + 0x14]
mov byte [esp + 0xb0], 7
call fcn.00406aa0
mov byte [esp + 0xb0], 6
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4785e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x478615
lea eax, [ecx - 1]
test eax, eax
jl 0x47872b
cmp eax, ecx
jg 0x47872b
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x478615
push 0x5c
lea edi, [esp + 0x18]
call fcn.00406b00
push 7
push 0x4f02e8
lea ecx, [esp + 0x1c]
push ecx
call fcn.004092d0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
add eax, 0x2c
push eax
lea edx, [esp + 0x70]
call fcn.0042df50
test eax, eax
je 0x478652
lea edx, [esp + 0x24]
push edx
push str.Default
lea eax, [esp + 0x74]
push eax
call fcn.0042e2d0
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x2c], 0
jne 0x47874c
mov eax, dword [esp + 0x30]
test eax, eax
je 0x47874c
cmp eax, dword [esp + 0x2c]
je 0x47874c
mov ecx, dword [eax]
add eax, 8
lea edi, [esp + 0x1c]
mov dword [esp + 0x30], ecx
call fcn.00406aa0
call fcn.0042ed40
mov esi, dword [esp + 0x1c]
push 2
push 0x4f0348
push esi
call fcn.004b0259
add esp, 0xc
test eax, eax
je 0x478742
push 1
push 0x4e3568
push esi
call fcn.004b0259
add esp, 0xc
test eax, eax
je 0x478742
cmp dword [esi - 0xc], 0
jle 0x478735
push 0x3d
push esi
call fcn.004aafe2
add esp, 8
test eax, eax
je 0x478735
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x478735
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.00413c10
lea edi, [esp + 0x18]
mov byte [esp + 0xb0], 8
call fcn.00406aa0
mov byte [esp + 0xb0], 6
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x478722
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebx + 8]
mov ebx, dword [esp + 0x18]
jmp 0x47873a
push 0x80070057
call fcn.00402940
mov edi, dword [ebx + 8]
mov ebx, esi
call fcn.00477da0
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x2c], 0
je 0x47865f
lea ecx, [esp + 0x6c]
push ecx
mov byte [esp + 0xb4], 5
call fcn.0042dbe0
mov byte [esp + 0xb0], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x478786
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [esp + 0xb0], 3
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4787aa
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0xb4], 0
call fcn.0042dbe0
mov dword [esp + 0xb0], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4787e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4