Function at 0x408400
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eeb94
mov eax, dword fs:[0]
push eax
sub esp, 0x4cc
mov eax, dword [0x536014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x418]
mov ebx, 5
push ebx
push str.SELECT___FROM_HistoryRecord_order_by_date_desc_time_desc
push 0x400
push eax
mov dword [ebp - 0x464], ebx
call fcn.00409fb0
add esp, 0x10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x47c]
push eax
call fcn.00403890
mov byte [ebp - 4], 1
cmp dword [ebp - 0x474], 0
jne 0x4084c8
push str.Null_Virtual_Machine_pointer
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x48c], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x488], eax
lea eax, [ebp - 0x490]
push 0x52d460
push eax
call fcn.0048a25b
cmp byte [ebp - 0x470], 0
jne 0x408951
test ebx, ebx
jle 0x408951
mov dword [ebp - 0x44c], 0xf
mov dword [ebp - 0x450], 0
mov byte [ebp - 0x460], 0
mov dword [ebp - 0x434], 0xf
mov dword [ebp - 0x438], 0
mov byte [ebp - 0x448], 0
mov dword [ebp - 0x41c], 0xf
mov dword [ebp - 0x420], 0
mov byte [ebp - 0x430], 0
push str.date
lea ecx, [ebp - 0x47c]
mov byte [ebp - 4], 2
call fcn.00401e60
mov ecx, dword [ebp - 0x474]
mov edi, eax
test ecx, ecx
jne 0x408596
push str.Null_Virtual_Machine_pointer
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x498], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x494], eax
lea eax, [ebp - 0x49c]
push 0x52d460
push eax
call fcn.0048a25b
test edi, edi
js 0x408909
mov eax, dword [ebp - 0x46c]
dec eax
cmp edi, eax
jg 0x408909
push edi
push ecx
call dword [sym.imp.sqlite3.dll_sqlite3_column_type]
add esp, 8
cmp eax, 5
jne 0x4085c6
mov edx, 0x50bc87
xor ecx, ecx
jmp 0x4085ef
push edi
push dword [ebp - 0x474]
call dword [sym.imp.sqlite3.dll_sqlite3_column_text]
mov edx, eax
add esp, 8
cmp byte [edx], 0
jne 0x4085e1
xor ecx, ecx
jmp 0x4085ef
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4085e6
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x448]
call fcn.00409e40
push str.path
lea ecx, [ebp - 0x47c]
call fcn.00401e60
mov ecx, dword [ebp - 0x474]
mov edi, eax
test ecx, ecx
jne 0x408660
push str.Null_Virtual_Machine_pointer
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x4a4], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x4a0], eax
lea eax, [ebp - 0x4a8]
push 0x52d460
push eax
call fcn.0048a25b
test edi, edi
js 0x4088c1
mov eax, dword [ebp - 0x46c]
dec eax
cmp edi, eax
jg 0x4088c1
push edi
push ecx
call dword [sym.imp.sqlite3.dll_sqlite3_column_type]
add esp, 8
cmp eax, 5
jne 0x408690
mov edx, 0x50bc87
xor ecx, ecx
jmp 0x4086b9
push edi
push dword [ebp - 0x474]
call dword [sym.imp.sqlite3.dll_sqlite3_column_text]
mov edx, eax
add esp, 8
cmp byte [edx], 0
jne 0x4086ab
xor ecx, ecx
jmp 0x4086b9
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4086b0
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x460]
call fcn.00409e40
push str.time
lea ecx, [ebp - 0x47c]
call fcn.00401e60
mov ecx, dword [ebp - 0x474]
mov edi, eax
test ecx, ecx
jne 0x40872a
push str.Null_Virtual_Machine_pointer
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x4b0], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x4b4]
push 0x52d460
push eax
call fcn.0048a25b
test edi, edi
js 0x408879
mov eax, dword [ebp - 0x46c]
dec eax
cmp edi, eax
jg 0x408879
push edi
push ecx
call dword [sym.imp.sqlite3.dll_sqlite3_column_type]
add esp, 8
cmp eax, 5
jne 0x40875a
mov edx, 0x50bc87
xor ecx, ecx
jmp 0x408789
push edi
push dword [ebp - 0x474]
call dword [sym.imp.sqlite3.dll_sqlite3_column_text]
mov edx, eax
add esp, 8
cmp byte [edx], 0
jne 0x408775
xor ecx, ecx
jmp 0x408789
mov ecx, edx
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408780
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x430]
call fcn.00409e40
lea ecx, [ebp - 0x47c]
call fcn.00402120
cmp dword [ebp - 0x44c], 0x10
lea eax, [ebp - 0x460]
cmovae eax, dword [ebp - 0x460]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408865
mov edi, dword [esi + 4]
lea eax, [ebp - 0x460]
cmp eax, edi
jae 0x40882a
mov eax, dword [esi]
lea ecx, [ebp - 0x460]
cmp eax, ecx
ja 0x40882a
sub ecx, eax
mov eax, 0x38e38e39
imul ecx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
cmp edi, dword [esi + 8]
jne 0x4087fd
push ecx
mov ecx, esi
call fcn.00408be0
mov eax, dword [esi]
lea edx, [ebx + ebx*8]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x484], ecx
lea eax, [eax + edx*8]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x408822
push eax
call fcn.00409510
mov ebx, dword [ebp - 0x464]
jmp 0x40885a
cmp edi, dword [esi + 8]
jne 0x408837
push ecx
mov ecx, esi
call fcn.00408be0
mov ecx, dword [esi + 4]
mov dword [ebp - 0x484], ecx
mov dword [ebp - 0x480], ecx
mov byte [ebp - 4], 4
test ecx, ecx
je 0x40885a
lea eax, [ebp - 0x460]
push eax
call fcn.00409510
add dword [esi + 4], 0x48
dec ebx
mov dword [ebp - 0x464], ebx
lea ecx, [ebp - 0x460]
mov byte [ebp - 4], 1
call fcn.00408360
jmp 0x408477
push str.Invalid_field_index_requested
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x4bc], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x4b8], eax
lea eax, [ebp - 0x4c0]
push 0x52d460
push eax
call fcn.0048a25b
push str.Invalid_field_index_requested
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x4c8], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x4c4], eax
lea eax, [ebp - 0x4cc]
push 0x52d460
push eax
call fcn.0048a25b
push str.Invalid_field_index_requested
push 0x3e8
push str.CPPSQLITE_ERROR
push 0x50b880
mov dword [ebp - method.CppSQLite3Exception.virtual_0], vtable.CppSQLite3Exception.0
mov dword [ebp - 0x4d4], 0x3e8
call dword [sym.imp.sqlite3.dll_sqlite3_mprintf]
add esp, 0x10
mov dword [ebp - 0x4d0], eax
lea eax, [ebp - 0x4d8]
push 0x52d460
push eax
call fcn.0048a25b
lea ecx, [ebp - 0x47c]
call fcn.00401950
mov al, 1
jmp 0x408968
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00466907
mov esp, ebp
pop ebp
ret 8