Function at 0x4be210
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52cf1b
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
push ebx
push esi
push edi
mov eax, dword [0x56b1dc]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
xor esi, esi
lea edi, [esp + 0x38]
mov dword [esp + 0x18], esi
call fcn.0045e680
lea ebx, [esp + 0x34]
mov dword [esp + 0xd8], esi
call fcn.0045e390
mov ebx, 1
mov byte [esp + 0xd8], bl
mov esi, dword [esp + 0x38]
mov eax, dword [esi - 0xc]
test eax, eax
jle 0x4be2a0
lea ecx, [eax - 1]
test ecx, ecx
jl 0x4be3ab
cmp ecx, eax
jg 0x4be3ab
movzx eax, word [esi + ecx*2]
cmp ax, 0x5c
je 0x4be2a0
push 0x5c
call fcn.004118c0
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4be2d3
lea eax, [ecx - 1]
test eax, eax
jl 0x4be3ab
cmp eax, ecx
jg 0x4be3ab
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x4be2d3
push 0x5c
lea edi, [esp + 0x38]
call fcn.004118c0
lea eax, [esi - 0x10]
mov dword [esp + 0x58], eax
call fcn.004020b0
add eax, 0x10
mov dword [esp + 0x14], eax
push 8
push str.punc.ini
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0xe4], 2
call fcn.00411670
mov esi, dword [esp + 0x14]
push esi
call dword [0x5313c0]
test eax, eax
jne 0x4be32e
lea eax, [esp + 0x34]
lea edi, [esp + 0x14]
call fcn.00401dd0
push 8
push str.punc.ini
mov ecx, edi
push ecx
call fcn.00411670
mov esi, dword [esp + 0x14]
mov edi, dword [ebp + 8]
push ebx
push 0
lea eax, [edi + 0x30]
push eax
push esi
push edi
call fcn.004bd950
lea eax, [esi - 0x10]
mov byte [esp + 0xd8], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be362
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x18]
push edx
mov ebx, str.phrase.ini
call fcn.004036c0
add esp, 8
mov byte [esp + 0xd8], 3
mov edi, dword [edi + 0x28]
mov ecx, dword [edi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub edi, 0x10
call edx
lea ecx, [edi + 0xc]
xor ebx, ebx
cmp dword [ecx], ebx
jl 0x4be3b5
cmp eax, dword [edi]
jne 0x4be3b5
mov esi, edi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4be3f1
push 0x80070057
call fcn.004026a0
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
cmp esi, ebx
jne 0x4be3ce
call fcn.004020a0
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.004ffedf
add esp, 0x10
add esi, 0x10
mov dword [esp + 0x30], esi
mov byte [esp + 0xd8], 4
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x3c], esi
lea ecx, [esp + 0x5c]
mov byte [esp + 0xd8], 5
mov edi, dword [esp + 0x14]
push ecx
call fcn.00465d40
mov byte [esp + 0xd8], 6
mov edx, dword [esp + 0x14]
push edx
call dword [0x5313c0]
test eax, eax
jne 0x4be4b4
mov edi, dword [esp + 0x30]
lea eax, [esp + 0x94]
push eax
call fcn.00465d40
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0xdc], 7
push str.Default
lea edx, [esp + 0x9c]
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
call fcn.00466240
mov ecx, dword [ebp + 8]
push ebx
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.004bdf10
add esp, 0xc
lea edx, [esp + 0x94]
push edx
mov dword [esp + 0x1c], eax
mov byte [esp + 0xdc], 6
call fcn.00465e10
jmp 0x4be7a0
push str.Version
push str.Properties
lea ecx, [esp + 0x64]
push ecx
call fcn.00466450
cmp eax, ebx
jne 0x4be526
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
push ebx
lea edx, [esp + 0x1c]
push edx
add eax, 0x30
push eax
mov eax, dword [esp + 0x20]
push eax
push ecx
call fcn.004bd950
lea edx, [esp + 0x5c]
push edx
mov byte [esp + 0xdc], 5
call fcn.00465e10
add esi, 0xfffffff0
mov byte [esp + 0xd8], 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4be7d6
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x4be7d6
lea ecx, [esp + 0x1c]
push ecx
push str.Custom
lea edx, [esp + 0x64]
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
call fcn.00466240
mov edi, dword [ebp + 8]
push ebx
lea eax, [esp + 0x20]
push eax
push edi
call fcn.004bdf10
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
push str.Default
lea edx, [esp + 0x64]
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
call fcn.00466240
push str.DefaultVersion
push str.Properties
lea eax, [esp + 0x64]
push eax
call fcn.00466450
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 0xa
mov dword [esp + 0x54], ebx
lea eax, [edi + 0x30]
mov byte [esp + 0xd8], 8
cmp byte [eax], bl
jne 0x4be68b
jmp 0x4be5d0
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x4be68b
cmp eax, dword [esp + 0x24]
je 0x4be68b
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 8]
lea eax, [ecx - 0x10]
lea edi, [esi - 0x10]
cmp eax, edi
je 0x4be646
cmp dword [edi + 0xc], ebx
lea esi, [edi + 0xc]
jl 0x4be633
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4be633
call fcn.004020b0
mov dword [esp + 0x18], eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x4be626
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov esi, dword [esp + 0x18]
add esi, 0x10
mov dword [esp + 0x3c], esi
jmp 0x4be646
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x40]
call fcn.004026c0
mov esi, dword [esp + 0x3c]
xor ebx, ebx
push 4
push str.__D:
push esi
call fcn.00505eff
add esp, 0xc
test eax, eax
jne 0x4be67d
lea edi, [esi + 8]
push edi
lea ecx, [esp + 0x44]
call fcn.004420e0
cmp eax, ebx
jne 0x4be67a
mov eax, edi
lea ebx, [esp + 0x40]
call fcn.004bfd40
xor ebx, ebx
jmp 0x4be67d
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
add eax, 0x30
cmp byte [eax], bl
je 0x4be5d0
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x94]
push ecx
call fcn.00465d40
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xdc], 9
push str.Default
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
call fcn.00466240
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x20]
push edx
push eax
call fcn.004bdf10
mov ecx, dword [esp + 0x38]
add esp, 0xc
lea edx, [esp + 0x94]
add eax, ecx
push edx
mov dword [esp + 0x1c], eax
mov byte [esp + 0xdc], 8
call fcn.00465e10
mov byte [esp + 0xd8], 6
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x54]
cmp eax, ecx
je 0x4be766
mov edi, eax
add eax, 0xc
mov dword [esp + 0x2c], eax
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x44]
call fcn.00442490
mov ecx, dword [edi + 0x10]
push ecx
lea ecx, [esp + 0x44]
call fcn.00442490
mov eax, dword [edi]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be754
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
mov dword [edx], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x48], edi
mov eax, dword [esp + 0x4c]
cmp eax, ebx
mov dword [esp + 0x44], ebx
je 0x4be787
mov edi, dword [eax]
push eax
call fcn.004ff948
add esp, 4
cmp edi, ebx
mov eax, edi
jne 0x4be772
mov ecx, dword [esp + 0x54]
cmp ecx, ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ecx
je 0x4be7a0
push ecx
call fcn.004ff948
add esp, 4
lea eax, [esp + 0x5c]
push eax
mov byte [esp + 0xdc], 5
call fcn.00465e10
add esi, 0xfffffff0
or edx, 0xffffffff
lea ecx, [esi + 0xc]
mov byte [esp + 0xd8], 4
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be7d6
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [esp + 0xd8], 3
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be7fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd8], 1
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 0x4be826
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ebx
push ecx
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0x25
call fcn.0043e260
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x2c]
cmp eax, ebx
je 0x4be851
push eax
call dword [0x531378]
mov dword [esi + 0x2c], ebx
mov byte [esp + 0xd8], bl
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be878
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0xd8], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be8a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4