Function at 0x52486e
Capabilities:
Check if file exists
Reference sql statements

Disassembly:
mov eax, 0x5df3ce
call fcn.0056c9b8
sub esp, 0x490
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov eax, dword [ebx]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, ebx
call dword [eax + 0x14]
cmp dword [ebp - 0x18], 0
je 0x524903
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x524903
push 0x18
call fcn.00415d9b
pop ecx
test eax, eax
je 0x5248c2
mov ecx, eax
call fcn.0043cb74
jmp 0x5248c4
xor eax, eax
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
mov dword [edi], eax
test ecx, ecx
je 0x5248d6
mov eax, dword [ecx]
push 1
call dword [eax + 0xc]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10c]
call fcn.00525ad2
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10c]
call fcn.00525cec
test al, al
jne 0x52491e
lea ecx, [ebp - 0x10c]
call fcn.00525b04
lea ecx, [ebp - 0x28]
call fcn.00403d40
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
and dword [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00442462
lea ecx, [ebp - 0x64]
call fcn.00441410
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x18c]
mov dword [ebp - 0x190], ecx
mov esi, 0xfde9
push esi
push eax
lea ecx, [ebp - 0x190]
call fcn.004e3d30
push dword [ebp - 0x190]
lea ecx, [ebp - 0x4c]
call fcn.00442523
lea eax, [ebp - 0x18c]
cmp dword [ebp - 0x190], eax
je 0x524983
push dword [ebp - 0x190]
call fcn.0057e74c
pop ecx
push 0xc8
lea eax, [ebp - 0x7c]
push eax
call fcn.0045bf75
pop ecx
pop ecx
lea eax, [ebp - 0x7c]
push eax
push str.SELECT_DISTINCT_urls.url_urls.title_urls.visit_count__visits.visit_time__FROM_urls_visits_WHERE_urls.idvisits.url_ORDER_BY_visits.visit_time_DESC_limit
lea eax, [ebp - 0xac]
push eax
call fcn.0045c08d
add esp, 0xc
lea ecx, [ebp - 0x7c]
call fcn.00403e22
lea eax, [ebp - 0xac]
cmp dword [ebp - 0x98], 0x10
cmovae eax, dword [ebp - 0xac]
push eax
lea eax, [ebp - 0xc4]
push eax
lea ecx, [ebp - 0x4c]
call fcn.004426c5
push eax
lea ecx, [ebp - 0x64]
call fcn.00441501
lea ecx, [ebp - 0xc4]
call fcn.004414ae
lea ecx, [ebp - 0x64]
call fcn.0044193a
test al, al
jne 0x524c3a
push 0x611da8
push 0
lea ecx, [ebp - 0x64]
call fcn.004416c7
lea ecx, [ebp - 0x290]
mov dword [ebp - 0x294], ecx
push esi
push eax
lea ecx, [ebp - 0x294]
call fcn.004e38e0
push dword [ebp - 0x294]
lea ecx, [ebp - 0x7c]
call fcn.00408fc4
lea eax, [ebp - 0x290]
cmp dword [ebp - 0x294], eax
je 0x524a4b
push dword [ebp - 0x294]
call fcn.0057e74c
pop ecx
cmp dword [ebp - 0x6c], 0
je 0x524c25
push 0x611da8
push 1
lea ecx, [ebp - 0x64]
call fcn.004416c7
lea ecx, [ebp - 0x394]
mov dword [ebp - 0x398], ecx
push esi
push eax
lea ecx, [ebp - 0x398]
call fcn.004e38e0
push dword [ebp - 0x398]
lea ecx, [ebp - 0xc4]
call fcn.00408fc4
lea eax, [ebp - 0x394]
cmp dword [ebp - 0x398], eax
je 0x524aa8
push dword [ebp - 0x398]
call fcn.0057e74c
pop ecx
push 0x611da8
push 3
lea ecx, [ebp - 0x64]
call fcn.004416c7
lea ecx, [ebp - 0x498]
mov dword [ebp - 0x49c], ecx
push esi
push eax
lea ecx, [ebp - 0x49c]
call fcn.004e38e0
push dword [ebp - 0x49c]
lea ecx, [ebp - 0x94]
call fcn.00408fc4
lea eax, [ebp - 0x498]
cmp dword [ebp - 0x49c], eax
je 0x524afb
push dword [ebp - 0x49c]
call fcn.0057e74c
pop ecx
lea eax, [ebp - 0x94]
cmp dword [ebp - 0x80], 8
cmovae eax, dword [ebp - 0x94]
push eax
call fcn.00580293
pop ecx
push 0
push 0xa
push edx
push eax
call fcn.0056c9e0
push edx
push eax
lea eax, [ebp - 0xdc]
push eax
mov ecx, ebx
call fcn.0052480d
push 0x14
call fcn.00415d9b
pop ecx
test eax, eax
je 0x524b43
mov ecx, eax
call fcn.0043ca6c
jmp 0x524b45
xor eax, eax
mov dword [ebp + 8], eax
push 0x5e3f94
lea ecx, [ebp - 0x40]
call fcn.00408fc4
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x7c]
push eax
call fcn.0043ce02
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d487
lea ecx, [ebp - 0x40]
call fcn.00403d40
push str.title
lea ecx, [ebp - 0x40]
call fcn.00408fc4
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc4]
push eax
call fcn.0043ce02
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d487
lea ecx, [ebp - 0x40]
call fcn.00403d40
push 0x5e3fa8
lea ecx, [ebp - 0x40]
call fcn.00408fc4
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xdc]
push eax
call fcn.0043ce02
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d487
lea ecx, [ebp - 0x40]
call fcn.00403d40
mov eax, dword [ebp + 8]
and dword [ebp + 8], 0
mov ecx, dword [edi]
push eax
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
sar eax, 2
push eax
call fcn.0043de68
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x524bff
mov eax, dword [ecx]
push 1
call dword [eax + 0xc]
lea ecx, [ebp - 0xdc]
call fcn.00403d40
lea ecx, [ebp - 0x94]
call fcn.00403d40
lea ecx, [ebp - 0xc4]
call fcn.00403d40
mov esi, 0xfde9
lea ecx, [ebp - 0x64]
call fcn.00441947
lea ecx, [ebp - 0x7c]
call fcn.00403d40
jmp 0x5249eb
lea ecx, [ebp - 0xac]
call fcn.00403e22
lea ecx, [ebp - 0x64]
call fcn.004414ae
lea ecx, [ebp - 0x4c]
call fcn.004424b7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.00525b04
lea ecx, [ebp - 0x28]
call fcn.00403d40
mov al, 1
jmp 0x52490d