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

Disassembly:
mov eax, 0x5c8e5e
call fcn.00541f9c
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 0x4f9db5
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 0x4f9db5
push 0x18
call fcn.00415ffa
pop ecx
test eax, eax
je 0x4f9d74
mov ecx, eax
call fcn.0043cdd4
jmp 0x4f9d76
xor eax, eax
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
mov dword [edi], eax
test ecx, ecx
je 0x4f9d88
mov eax, dword [ecx]
push 1
call dword [eax + 0xc]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10c]
call fcn.004faf84
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10c]
call fcn.004fb19e
test al, al
jne 0x4f9dd0
lea ecx, [ebp - 0x10c]
call fcn.004fafb6
lea ecx, [ebp - 0x28]
call fcn.00403f80
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.004426ca
lea ecx, [ebp - 0x64]
call fcn.00441678
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.004c2aa0
push dword [ebp - 0x190]
lea ecx, [ebp - 0x4c]
call fcn.0044278b
lea eax, [ebp - 0x18c]
cmp dword [ebp - 0x190], eax
je 0x4f9e35
push dword [ebp - 0x190]
call fcn.00553d2a
pop ecx
push 0xc8
lea eax, [ebp - 0x7c]
push eax
call fcn.0045c21e
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.0045c336
add esp, 0xc
lea ecx, [ebp - 0x7c]
call fcn.00404062
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.0044292d
push eax
lea ecx, [ebp - 0x64]
call fcn.00441769
lea ecx, [ebp - 0xc4]
call fcn.00441716
lea ecx, [ebp - 0x64]
call fcn.00441ba2
test al, al
jne 0x4fa0ec
push 0x5ff3b8
push 0
lea ecx, [ebp - 0x64]
call fcn.0044192f
lea ecx, [ebp - 0x290]
mov dword [ebp - 0x294], ecx
push esi
push eax
lea ecx, [ebp - 0x294]
call fcn.004c2740
push dword [ebp - 0x294]
lea ecx, [ebp - 0x7c]
call fcn.0040921d
lea eax, [ebp - 0x290]
cmp dword [ebp - 0x294], eax
je 0x4f9efd
push dword [ebp - 0x294]
call fcn.00553d2a
pop ecx
cmp dword [ebp - 0x6c], 0
je 0x4fa0d7
push 0x5ff3b8
push 1
lea ecx, [ebp - 0x64]
call fcn.0044192f
lea ecx, [ebp - 0x394]
mov dword [ebp - 0x398], ecx
push esi
push eax
lea ecx, [ebp - 0x398]
call fcn.004c2740
push dword [ebp - 0x398]
lea ecx, [ebp - 0xc4]
call fcn.0040921d
lea eax, [ebp - 0x394]
cmp dword [ebp - 0x398], eax
je 0x4f9f5a
push dword [ebp - 0x398]
call fcn.00553d2a
pop ecx
push 0x5ff3b8
push 3
lea ecx, [ebp - 0x64]
call fcn.0044192f
lea ecx, [ebp - 0x498]
mov dword [ebp - 0x49c], ecx
push esi
push eax
lea ecx, [ebp - 0x49c]
call fcn.004c2740
push dword [ebp - 0x49c]
lea ecx, [ebp - 0x94]
call fcn.0040921d
lea eax, [ebp - 0x498]
cmp dword [ebp - 0x49c], eax
je 0x4f9fad
push dword [ebp - 0x49c]
call fcn.00553d2a
pop ecx
lea eax, [ebp - 0x94]
cmp dword [ebp - 0x80], 8
cmovae eax, dword [ebp - 0x94]
push eax
call fcn.00555871
pop ecx
push 0
push 0xa
push edx
push eax
call fcn.00541fc0
push edx
push eax
lea eax, [ebp - 0xdc]
push eax
mov ecx, ebx
call fcn.004f9cbf
push 0x14
call fcn.00415ffa
pop ecx
test eax, eax
je 0x4f9ff5
mov ecx, eax
call fcn.0043cccc
jmp 0x4f9ff7
xor eax, eax
mov dword [ebp + 8], eax
push 0x5cffb4
lea ecx, [ebp - 0x40]
call fcn.0040921d
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x7c]
push eax
call fcn.0043d062
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d6e7
lea ecx, [ebp - 0x40]
call fcn.00403f80
push str.title
lea ecx, [ebp - 0x40]
call fcn.0040921d
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc4]
push eax
call fcn.0043d062
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d6e7
lea ecx, [ebp - 0x40]
call fcn.00403f80
push 0x5cffc8
lea ecx, [ebp - 0x40]
call fcn.0040921d
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xdc]
push eax
call fcn.0043d062
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.0043d6e7
lea ecx, [ebp - 0x40]
call fcn.00403f80
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.0043e0c8
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4fa0b1
mov eax, dword [ecx]
push 1
call dword [eax + 0xc]
lea ecx, [ebp - 0xdc]
call fcn.00403f80
lea ecx, [ebp - 0x94]
call fcn.00403f80
lea ecx, [ebp - 0xc4]
call fcn.00403f80
mov esi, 0xfde9
lea ecx, [ebp - 0x64]
call fcn.00441baf
lea ecx, [ebp - 0x7c]
call fcn.00403f80
jmp 0x4f9e9d
lea ecx, [ebp - 0xac]
call fcn.00404062
lea ecx, [ebp - 0x64]
call fcn.00441716
lea ecx, [ebp - 0x4c]
call fcn.0044271f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.004fafb6
lea ecx, [ebp - 0x28]
call fcn.00403f80
mov al, 1
jmp 0x4f9dbf