Function at 0x66668430
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
mov esi, edx
push ebx
sub esp, 0x8c
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x58], eax
test edx, edx
js 0x666684a0
mov dword [esp], 0
lea ebx, [esp + 0x78]
mov edx, 0xc
mov ecx, ebx
mov dword [esp + 0x78], 0
mov dword [esp + 0x5c], ebx
call fcn.666450c0
mov ebp, eax
test eax, eax
je 0x66668690
mov ebx, dword [esp + 0x78]
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_reset
cmp ebp, 0x65
cmove ebp, eax
add esp, 0x8c
pop ebx
pop esi
mov eax, ebp
pop edi
pop ebp
ret
mov eax, dword [esp + 0x58]
mov eax, dword [eax + 0x104]
test eax, eax
je 0x666684be
mov ebx, dword [esp + 0x58]
cmp dword [ebx + 0x118], esi
je 0x6666858b
cmp dword [esp + 0xa0], 0xffffffff
je 0x66668570
lea eax, [esp + 0x78]
mov dword [esp], 0
mov edx, 0xd
mov dword [esp + 0x5c], eax
mov ecx, eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x78], 0
call fcn.666450c0
mov ebp, eax
test eax, eax
jne 0x6666847a
mov ebx, dword [esp + 0x58]
mov eax, esi
mov ebp, edi
sar ebp, 0x1f
imul dword [ebx + 0x100]
mov dword [esp + 4], 1
add eax, edi
adc edx, ebp
shld edx, eax, 0xa
shl eax, 0xa
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_bind_int64
mov eax, esi
imul dword [ebx + 0x100]
mov dword [esp + 4], 2
add eax, edi
adc edx, ebp
shld edx, eax, 0xa
shl eax, 0xa
add eax, 0x3ff
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
adc edx, 0
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_bind_int64
jmp 0x666686d6
mov dword [esp], 0
xor ebp, ebp
call sym.libsqlite3_0.dll_sqlite3_reset
add esp, 0x8c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ecx + ecx*2]
mov ecx, dword [esp + 0xac]
or ecx, dword [esp + 0xb0]
mov dword [esp + 0x38], ecx
lea eax, [eax + edx*8]
je 0x6666893f
mov eax, dword [eax + 0xc]
mov dword [esp + 0x78], eax
test eax, eax
je 0x66668af9
xor ecx, ecx
mov dword [esp + 0x44], esi
xor ebp, ebp
mov esi, dword [esp + 0xa8]
mov dword [esp + 0x48], edi
xor ebx, ebx
mov edi, ecx
jmp 0x666685f5
mov eax, dword [esp + 0x78]
mov dword [ebp + ebx*4], eax
add ebx, 1
mov eax, dword [esp + 0x78]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
test eax, eax
je 0x66668b0a
test esi, esi
je 0x6666861c
cmp esi, dword [eax + 0x10]
jg 0x666685e3
mov ecx, dword [esp + 0xa4]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x666685e3
cmp edi, ebx
jne 0x666685d8
mov eax, dword [0x6667ced0]
test eax, eax
jne 0x66668aef
call fcn.66587320
test eax, eax
jne 0x66668ad1
call fcn.665cb300
test eax, eax
jne 0x66668ad1
add edi, 0x10
mov eax, 0
mov ecx, edi
shl ecx, 2
cmovns eax, ecx
cdq
test ebp, ebp
je 0x66668b51
test ecx, ecx
jle 0x66668b5b
cmp ecx, 0x7ffffeff
jg 0x66668ad1
mov ecx, edx
mov edx, eax
mov eax, ebp
call fcn.6658ba80
test eax, eax
je 0x66668ad1
mov ebp, eax
jmp 0x666685d8
mov ecx, dword [esp + 0x58]
mov eax, esi
imul dword [ecx + 0x100]
mov dword [esp + 4], 1
mov ecx, eax
mov eax, edi
mov ebx, edx
cdq
add ecx, edi
mov eax, dword [esp + 0xa0]
adc ebx, edx
shld ebx, ecx, 0xa
shl ecx, 0xa
cdq
add eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
adc edx, ebx
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_bind_int64
mov ebx, dword [esp + 0x78]
mov eax, dword [esp + 0xac]
or eax, dword [esp + 0xb0]
mov dword [esp + 0x54], eax
mov ebp, ebx
jmp 0x6666889c
mov eax, ebp
call fcn.66594000
mov edx, 2
mov eax, ebp
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], edi
call fcn.66594040
call fcn.6658cc70
mov esi, eax
mov eax, ebp
mov edi, edx
call fcn.66594000
mov edx, 3
mov eax, ebp
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], edi
call fcn.66594040
call fcn.6658cc70
mov dword [esp + 0x38], eax
mov eax, ebp
mov dword [esp + 0x3c], edx
call fcn.66594000
mov edx, 4
mov eax, ebp
call fcn.66594040
mov edx, 1
call fcn.665ac480
mov edi, eax
mov eax, ebp
call fcn.66594000
mov edx, 4
mov eax, ebp
call fcn.66594040
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_value_blob
mov esi, eax
mov eax, ebp
call fcn.66594000
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov eax, ecx
or eax, edx
mov eax, dword [esp + 0xa4]
setne bl
test eax, eax
setne al
test bl, al
je 0x66668a50
test esi, esi
je 0x66668a50
mov eax, dword [esp + 0xac]
test eax, eax
jne 0x66668a68
lea eax, [esp + 0x70]
mov dword [esp + 4], edi
mov ecx, dword [esp + 0xa8]
mov dword [esp + 8], eax
mov edx, dword [esp + 0xa4]
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0x58]
mov dword [esp], esi
call fcn.66667e10
test eax, eax
jne 0x66668ac0
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
test eax, eax
jne 0x66668a50
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x50], edx
mov eax, dword [esp + 0x54]
xor ebx, ebx
test eax, eax
mov eax, dword [esp + 0xb4]
sete bl
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov edi, dword [esp + 0x3c]
add eax, 1
mov esi, dword [esp + 0x38]
mov dword [esp + 4], edx
mov edx, ebx
mov dword [esp + 0x44], eax
lea eax, [esp + 0x6c]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
mov dword [esp], ecx
call fcn.665d4630
test eax, eax
jne 0x66668ac0
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0xb4]
call fcn.665fc620
test eax, eax
jne 0x66668ac0
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_step
cmp eax, 0x64
jne 0x66668ac0
mov edx, 1
mov eax, ebp
mov dword [esp + 0x6c], 0
call fcn.66594040
call fcn.6658cc70
mov esi, eax
mov edi, edx
test ebp, ebp
jne 0x666686f8
mov dword [esp + 0x70], eax
xor eax, eax
mov dword [esp + 0x74], edx
mov edx, 2
call fcn.66594040
call fcn.6658cc70
mov dword [esp + 0x78], eax
xor eax, eax
mov dword [esp + 0x7c], edx
mov edx, 3
call fcn.66594040
call fcn.6658cc70
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x3c], edx
mov edx, 4
call fcn.66594040
mov edx, 1
call fcn.665ac480
mov edx, 4
mov edi, eax
xor eax, eax
call fcn.66594040
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_value_blob
mov esi, eax
jmp 0x66668787
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xa4]
add eax, 4
call fcn.6658d350
test eax, eax
je 0x666684be
mov dword [esp + 0x78], eax
mov edx, 0x68
xor ecx, ecx
mov ebx, 1
mov dword [esp + 0x44], 0x68
lea ebp, [esp + 0x78]
mov eax, dword [0x6667ced0]
test eax, eax
jne 0x66668b47
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
call fcn.66587320
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
test eax, eax
jne 0x66668ac9
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
call fcn.665cb300
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
test eax, eax
jne 0x66668ac9
mov eax, edx
mov edx, ecx
call fcn.6658bcf0
mov edx, eax
test eax, eax
je 0x66668b85
mov eax, dword [esp + 0x44]
mov dword [esp], edx
shl ebx, 2
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp + 0x44], edx
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x44]
lea eax, [edx + 0x60]
mov dword [edx], 0x7fffffff
mov dword [edx + 0x38], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
test eax, eax
jne 0x66668b70
mov eax, dword [esp + 0xb4]
xor ebx, ebx
call fcn.665fc620
cmp dword [esp + 0xa0], 0xffffffff
mov ebp, eax
je 0x6666847e
test eax, eax
jne 0x6666847e
jmp 0x666684cc
mov eax, dword [esp + 0x78]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x50], eax
jmp 0x6666881e
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], edi
mov dword [esp], esi
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x70]
mov edx, dword [esp + 0xa4]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x58]
call fcn.66667e10
test eax, eax
jne 0x66668ac0
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x50], eax
jmp 0x6666881e
mov ebx, ebp
mov ebp, eax
jmp 0x6666847e
mov eax, dword [esp + 0x38]
test eax, eax
je 0x66668ad9
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_free
mov dword [esp], 0
mov ebp, 7
call sym.libsqlite3_0.dll_sqlite3_reset
jmp 0x6666857e
lock or dword [esp], 0
jmp 0x66668647
mov dword [esp], 0
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x666684be
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
cmp ebx, 1
jle 0x66668b96
mov dword [esp + 0xc], 0x66587aa0
mov dword [esp + 8], 4
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sub.msvcrt.dll_qsort
lea eax, [ebx*4 + 0x64]
xor ecx, ecx
mov dword [esp + 0x44], eax
mov edx, eax
jmp 0x66668979
lock or dword [esp], 0
jmp 0x666689c0
call fcn.6658bcf0
jmp 0x6666867f
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_free
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x66668ad9
mov dword [esp], ebp
mov dword [esp + 0x38], edx
call sym.libsqlite3_0.dll_sqlite3_free
mov edx, dword [esp + 0x38]
jmp 0x66668a22
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x66668ad1
jmp 0x66668ad9
test ebx, ebx
jne 0x66668ba7
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x666684be
mov dword [esp + 0x44], 0x68
mov edx, 0x68
xor ecx, ecx
mov ebx, 1
jmp 0x66668979