Function at 0x4979b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x578cb8
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x5fc150]
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 edi, dword [ebp + 0xc]
lea ecx, [esi + 0x310]
mov ebx, dword [ebp + 8]
mov eax, edi
neg eax
mov dword [ebp - 0x34], edi
push ebx
sbb eax, eax
and eax, 0x84
lea ecx, [ecx + eax]
call fcn.00439b40
cmp eax, 0xffffffff
je 0x497c7e
mov al, byte [esi + 0x68ff4]
test al, 1
je 0x497a1e
mov ecx, dword [esi + 0x320]
jmp 0x497a20
xor ecx, ecx
test al, 2
je 0x497a2c
mov eax, dword [esi + 0x3a4]
jmp 0x497a2e
xor eax, eax
add eax, ecx
cmp byte [ebp + 0x10], 0
mov dword [ebp - 0x38], eax
je 0x497a46
push ebx
call fcn.00439ba0
mov ecx, eax
call fcn.0041a510
call fcn.00439ba0
mov eax, dword [esi]
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x94], 0x3eb
push ecx
lea ecx, [esi + 0x68a08]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], ebx
call fcn.004c1430
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
cmp dword [ebx + 0x64], 2
je 0x497b13
mov byte [ebp - 0x29], al
call fcn.0040baa0
cmp dword [ebx + 0x88], 8
lea edi, [ebx + 0x74]
mov dword [ebp - 0x30], eax
jb 0x497abe
mov ecx, dword [edi]
jmp 0x497ac0
mov ecx, edi
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x497ad8
mov ecx, dword [ebp - 0x30]
push eax
call fcn.004ba550
mov byte [ebp - 0x29], 1
cmp dword [edi + 0x14], 8
jb 0x497ae2
mov eax, dword [edi]
jmp 0x497ae4
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x497b00
cmp dword [edi + 0x14], 8
jb 0x497af7
mov edi, dword [edi]
push edi
lea ecx, [ebp - 0x28]
call fcn.00403ef0
cmp byte [ebp - 0x29], 0
je 0x497b10
mov ecx, dword [ebp - 0x30]
push 1
call fcn.004ba550
mov edi, dword [ebp - 0x34]
test edi, edi
jne 0x497b22
mov ecx, dword [esi + 0x320]
mov dword [ebp - 0x34], ecx
jmp 0x497b2b
mov eax, dword [esi + 0x3a4]
mov dword [ebp - 0x34], eax
mov al, byte [ebx + 0xb8]
test al, al
je 0x497b3f
push 0
push ebx
mov ecx, esi
call fcn.00476b50
push edi
push ebx
mov ecx, esi
call fcn.00478640
cmp dword [ebp - 0x34], 1
mov byte [ebp - 0x29], al
mov dword [ebp - 0x30], 0
jne 0x497b85
push edi
mov ecx, esi
call fcn.0046ab60
test al, al
je 0x497b82
push edi
mov ecx, esi
call fcn.004726c0
mov eax, dword [esi]
push edi
push 0
push 0x823
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x30], eax
mov al, byte [ebp - 0x29]
test al, al
je 0x497c0e
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x94], 0x3ed
push eax
lea ecx, [esi + 0x68a08]
call fcn.004c1430
mov ecx, dword [esi + 0x68fd8]
test ecx, ecx
je 0x497bd4
push edi
push ebx
add ecx, 0x6c
call fcn.005029a0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x497bd4
mov ecx, dword [esi + 0x68fd8]
push edi
push eax
add ecx, 0x6c
call fcn.005029a0
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x497be0
lea eax, [ebp - 0x28]
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041b150
test eax, eax
jne 0x497c0e
cmp dword [ebp - 0x18], eax
jbe 0x497c0e
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x497c02
lea eax, [ebp - 0x28]
push eax
lea ecx, [esi + 0x688dc]
call fcn.0045c380
push 0xac08
mov ecx, esi
call fcn.0048e6c0
call fcn.0040baa0
test dword [eax + 0x5c], 0x200
je 0x497c4e
cmp dword [ebp - 0x38], 1
jne 0x497c4e
mov ecx, esi
call fcn.00474b10
test al, al
je 0x497c4e
cmp byte [esi + 0x68939], 0
jne 0x497c4e
push 0xa033
mov ecx, esi
call fcn.0048e6c0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x497c6a
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00407270
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
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.0052c233
mov esp, ebp
pop ebp
ret 0xc