Function at 0x4be6f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [0x564030]
sub esp, 0x14
mov edx, 0x140
mov byte [0x564024], 1
push ebx
push esi
push edi
push 0xf0
call fcn.0041e500
add esp, 4
cmp byte [0x564025], 0
je 0x4be996
cmp byte [0x556963], 0
je 0x4be996
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, 0xa
nop dword [eax]
call edi
sub eax, dword [0x560284]
sub eax, dword [0x560288]
movd xmm2, eax
mov eax, dword [0x56028c]
cvtdq2pd xmm2, xmm2
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x545940]
mov eax, dword [0x56029c]
cdq
sub eax, edx
sar eax, 1
mulsd xmm1, qword [0x560290]
subsd xmm2, xmm1
divsd xmm2, qword [0x560290]
cvttsd2si ecx, xmm2
cmp ecx, eax
jge 0x4be7ac
mov eax, dword [0x564018]
push 0x564018
mov eax, dword [eax + 8]
call eax
add esp, 4
call fcn.004692f0
call fcn.00469420
sub esi, 1
jne 0x4be740
mov ecx, dword [0x564030]
mov edx, str.XYZ1_
push 0x3d38
call fcn.0041f190
movsd xmm1, qword [0x545558]
add esp, 4
mov ecx, 0x564018
call fcn.004a4240
call edi
sub eax, dword [0x560284]
mov dword [0x56028c], esi
mov esi, 0x14
mov dword [0x560288], eax
call edi
sub eax, dword [0x560284]
sub eax, dword [0x560288]
movd xmm2, eax
mov eax, dword [0x56028c]
cvtdq2pd xmm2, xmm2
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x545940]
mov eax, dword [0x56029c]
cdq
sub eax, edx
sar eax, 1
mulsd xmm1, qword [0x560290]
subsd xmm2, xmm1
divsd xmm2, qword [0x560290]
cvttsd2si ecx, xmm2
cmp ecx, eax
jge 0x4be864
mov eax, dword [0x564018]
push 0x564018
mov eax, dword [eax + 8]
call eax
add esp, 4
call fcn.004692f0
call fcn.00469420
dec esi
test esi, esi
jg 0x4be7f8
mov esi, 0x3c
call fcn.00495ed0
test byte [0x563c58], 0x10
jne 0x4be8fb
call edi
sub eax, dword [0x560284]
sub eax, dword [0x560288]
movd xmm2, eax
mov eax, dword [0x56028c]
cvtdq2pd xmm2, xmm2
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x545940]
mov eax, dword [0x56029c]
cdq
sub eax, edx
sar eax, 1
mulsd xmm1, qword [0x560290]
subsd xmm2, xmm1
divsd xmm2, qword [0x560290]
cvttsd2si ecx, xmm2
cmp ecx, eax
jge 0x4be8ed
mov eax, dword [0x564018]
push 0x564018
mov eax, dword [eax + 8]
call eax
add esp, 4
call fcn.004692f0
call fcn.00469420
dec esi
test esi, esi
jg 0x4be873
call fcn.00495ed0
call fcn.00495ed0
movsd xmm1, qword [0x545558]
mov ecx, 0x564018
call fcn.004a4380
mov ecx, dword [0x564028]
mov byte [0x556963], 0
test ecx, ecx
je 0x4be996
mov eax, dword [0x56402c]
test eax, eax
je 0x4be996
mov dword [0x55312c], ecx
mov dword [0x5530c4], eax
call fcn.004a1b70
mov esi, dword [0x560204]
push dword [esi + 4]
push dword [esi + 0xc]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [esi]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esi + 0xc]
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [0x560204]
test eax, eax
je 0x4be980
push eax
call fcn.00501c9e
add esp, 4
mov dword [0x560204], 0
mov edx, dword [0x5530c4]
mov ecx, dword [0x55312c]
call fcn.0040aa00
mov dword [0x560204], eax
cmp byte [0x564100], 0
mov byte [0x564026], 0
je 0x4bed96
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, 1
call fcn.0048d260
lea edx, [ebp - 4]
mov dword [ebp - 4], 0
mov ecx, edi
mov byte [0x56388c], 1
call fcn.0048faa0
mov esi, dword [ebp - 4]
test esi, esi
je 0x4bea07
push esi
call ebx
cmp eax, 0xffffffff
je 0x4be9ec
test al, 0x10
jne 0x4be9ec
mov ecx, esi
call fcn.0048f530
mov eax, dword [esi - 8]
add esi, 0xfffffff8
cmp eax, 0xffffffff
je 0x4bea07
dec eax
mov dword [esi], eax
test eax, eax
jg 0x4bea07
push esi
call fcn.00501c9e
add esp, 4
movsd xmm0, qword [0x563898]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x4bea24
inc edi
cmp edi, 0x10
jl 0x4be9b5
jmp 0x4bea2b
mov byte [0x564026], 1
mov edx, dword [0x564050]
mov ecx, str._Title_
call fcn.00462a60
mov esi, dword [0x564030]
mov edi, eax
mov eax, dword [esi]
test eax, eax
je 0x4bea5f
mov ecx, dword [esi + 0xc]
imul ecx, dword [esi + 8]
shl ecx, 2
push ecx
push 0
push eax
call fcn.004fdf60
add esp, 0xc
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4bea7c
mov eax, dword [esi + 0xc]
imul eax, dword [esi + 8]
shl eax, 2
push eax
push 0
push ecx
call fcn.004fdf60
add esp, 0xc
test edi, edi
je 0x4beabb
cmp byte [esi + 0x56], 0
je 0x4bea91
mov edx, esi
mov ecx, edi
call fcn.00468af0
jmp 0x4beaa0
push 0
push ecx
mov edx, edi
mov ecx, esi
call fcn.0041f010
add esp, 8
mov eax, dword [edi - 8]
add edi, 0xfffffff8
cmp eax, 0xffffffff
je 0x4beabb
dec eax
mov dword [edi], eax
test eax, eax
jg 0x4beabb
push edi
call fcn.00501c9e
add esp, 4
mov bl, byte [0x556a1f]
test bl, bl
je 0x4beae3
mov ecx, dword [0x564620]
cmp dword [ecx + 4], 0
cmove ecx, dword [0x564064]
xor edx, edx
call fcn.00492040
mov bl, byte [0x556a1f]
mov eax, dword [0x5641d0]
test eax, eax
je 0x4beaef
mov eax, dword [eax - 4]
mov edx, dword [0x5641cc]
test edx, edx
je 0x4beafc
mov edx, dword [edx - 4]
mov ecx, dword [0x5641c8]
test ecx, ecx
je 0x4beb09
mov ecx, dword [ecx - 4]
cmp ecx, edx
jl 0x4beb14
cmp ecx, eax
cmovge eax, ecx
jmp 0x4beb19
cmp edx, eax
cmovge eax, edx
lea eax, [eax + eax*2]
lea edi, [eax*2 + 0x10]
mov dword [ebp - 4], edi
test bl, bl
je 0x4beb99
mov cl, byte [0x564025]
test cl, cl
je 0x4beb4c
movsd xmm1, qword [0x545520]
mov ecx, 0x564018
call fcn.004a4240
mov cl, byte [0x564025]
mov eax, dword [0x5530c4]
cdq
sub eax, edx
movzx ecx, cl
mov esi, eax
mov eax, dword [0x55312c]
cdq
sub eax, edx
sar esi, 1
mov edi, eax
sub esi, 0x78
mov eax, dword [ebp - 4]
sar edi, 1
push ecx
xor ecx, ecx
sub edi, 0xa0
test esi, esi
push 0x40
cmovle esi, ecx
add esi, 0x94
test edi, edi
push eax
cdq
cmovle edi, ecx
sub eax, edx
sar eax, 1
sub edi, eax
push esi
lea edx, [edi + 0xa0]
jmp 0x4bebde
mov eax, dword [0x5530c4]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [0x55312c]
cdq
sub eax, edx
sar ecx, 1
mov esi, eax
sub ecx, 0x78
xor eax, eax
sar esi, 1
sub esi, 0xa0
test ecx, ecx
push 0
cmovle ecx, eax
add ecx, 0x58
test esi, esi
push 0x40
cmovle esi, eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
sub esi, eax
push edi
push ecx
lea edx, [esi + 0xa0]
mov ecx, dword [0x564034]
call fcn.004c5460
mov edi, dword [0x5641c8]
add esp, 0x10
mov esi, dword [0x564034]
mov ecx, dword [0x5645c4]
push 0
mov edx, dword [esi + 0x10]
push edi
push 8
push 8
call fcn.0048c2c0
add esp, 0x10
cmp dword [esi + 0x48], 0
jne 0x4bec5c
mov dword [ebp - 0x14], 8
mov dword [ebp - 0x10], 0xa
test edi, edi
jne 0x4bec2c
xor eax, eax
jmp 0x4bec2f
mov eax, dword [edi - 4]
mov ecx, dword [esi + 8]
lea eax, [eax + eax*2]
lea eax, [eax*2 + 9]
mov dword [ebp - 8], 0x17
mov dword [ebp - 0xc], eax
mov edx, 8
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x10]
push 0xa
call fcn.0041f610
add esp, 0xc
mov edi, dword [0x5641cc]
xor ecx, ecx
cmp byte [0x564026], cl
mov eax, 3
mov esi, dword [0x564034]
cmovne eax, ecx
mov ecx, dword [0x5645c4]
push eax
push edi
mov edx, dword [esi + 0x10]
push 0x18
push 8
call fcn.0048c2c0
add esp, 0x10
cmp dword [esi + 0x48], 0
jne 0x4becdb
mov dword [ebp - 0x14], 8
mov dword [ebp - 0x10], 0x1a
test edi, edi
jne 0x4becab
xor eax, eax
jmp 0x4becae
mov eax, dword [edi - 4]
mov ecx, dword [esi + 8]
lea eax, [eax + eax*2]
lea eax, [eax*2 + 9]
mov dword [ebp - 8], 0x27
mov dword [ebp - 0xc], eax
mov edx, 8
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x10]
push 0x1a
call fcn.0041f610
add esp, 0xc
mov edi, dword [0x5641d0]
mov esi, dword [0x564034]
mov ecx, dword [0x5645c4]
push 0
push edi
mov edx, dword [esi + 0x10]
push 0x28
push 8
call fcn.0048c2c0
add esp, 0x10
cmp dword [esi + 0x48], 0
jne 0x4bed4b
mov dword [ebp - 0x14], 8
mov dword [ebp - 0x10], 0x2a
test edi, edi
jne 0x4bed1b
xor eax, eax
jmp 0x4bed1e
mov eax, dword [edi - 4]
mov ecx, dword [esi + 8]
lea eax, [eax + eax*2]
lea eax, [eax*2 + 9]
mov dword [ebp - 8], 0x37
mov dword [ebp - 0xc], eax
mov edx, 8
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x10]
push 0x2a
call fcn.0041f610
add esp, 0xc
mov ecx, dword [0x564034]
push 1
mov edx, dword [ecx + 0x44]
mov word [ecx + 0x50], 0x101
mov dword [ecx + 0x54], 0
call fcn.004c5a40
add esp, 4
cmp byte [0x564025], 0
jne 0x4bed84
mov ecx, dword [0x564034]
mov edx, 1
call fcn.004c61c0
movsd xmm1, qword [0x545558]
mov ecx, 0x564018
call fcn.004a4240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret