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

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0xec
mov eax, dword [edx]
mov dword [esp + 0x64], 0
mov dword [esp + 0x2c], eax
lea eax, [ecx + ecx*2]
lea esi, [eax*4]
mov dword [esp + 0x48], 0
lea eax, [esi + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x100]
test eax, eax
je 0x666636fd
mov eax, dword [esp + 0x100]
mov eax, dword [eax]
mov dword [esp + 0x48], eax
mov eax, dword [ebp]
mov ecx, 0x18
lea edi, [esp + 0x80]
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov eax, dword [eax + 0x30]
mov dword [esp + 0x70], 0
mov dword [esp + 0x40], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
lea eax, [ebx + ebx*2]
lea edi, [ebx + 1]
mov eax, dword [ecx + eax*4 + 0x18]
mov dword [esp + 0x24], eax
test eax, eax
je 0x66663b40
lea eax, [esi + 0x18]
add eax, ecx
mov dword [esp + 0x28], eax
lea eax, [ecx + esi + 0x24]
mov dword [esp + 0x38], eax
lea eax, [edi + edi*2]
lea eax, [ecx + eax*4]
mov edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
lea edx, [edx + edx*2]
lea esi, [eax + edx*4 - 0xc]
mov eax, ebp
lea edx, [esp + 0x80]
mov ecx, dword [esi]
mov dword [esp + 0x30], esi
call fcn.66644cf0
mov eax, dword [esi + 8]
mov dword [esp + 0xd8], 0
mov dword [esp + 0x4c], eax
add eax, 1
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x4c], 0
cmp dword [eax + 4], 1
je 0x66663cc0
lea eax, [esp + 0x64]
mov dword [esp + 0xc], ebx
mov edx, dword [esp + 0x2c]
mov ecx, 0x20
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, ebp
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.6665f720
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x666639a8
mov ebx, dword [esp + 0x64]
lea eax, [ebp + 0x24]
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], eax
cmp byte [ebx + 0x10], 0
jne 0x666639a8
mov eax, dword [ebx + 0x48]
movzx esi, word [eax + 4]
imul eax, esi, 0x58
add eax, ebx
mov ecx, dword [eax + 0x90]
mov edi, dword [eax + 0x8c]
cmp dword [esp + 0x6c], ecx
je 0x66663d10
mov eax, dword [esp + 0x100]
test eax, eax
je 0x66663854
mov eax, dword [esp + 0x48]
cmp dword [esp + 0xbc], eax
jg 0x666639a8
mov dword [esp], edi
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x68]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x6c], 0
call fcn.665da120
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x58]
imul eax, esi, 0x58
add eax, ebx
mov edx, dword [eax + 0xa0]
test edx, edx
jne 0x666638a4
mov edx, dword [esp + 0x4c]
test edx, edx
jne 0x66663973
cmp byte [eax + 0xa4], 0
je 0x66663973
mov eax, dword [ebp + 0x24]
mov edx, dword [esp + 0x50]
or edx, eax
je 0x666640a0
test eax, eax
jne 0x66663953
mov edx, dword [esp + 0x64]
mov eax, dword [edx + 0x48]
movzx eax, word [eax + 4]
imul eax, eax, 0x58
lea edx, [edx + eax + 0x98]
mov eax, dword [edx]
mov edx, dword [edx + 4]
mov dword [esp + 0x5c], edx
mov edx, dword [ebp]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x9c]
add eax, dword [esp + 0x90]
cmp eax, dword [edx + 0x4c]
jge 0x66664177
cmp byte [esp + 0xb9], 0
jne 0x6666413f
cmp word [esp + 0xb8], 0
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
je 0x666640c1
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], edx
lea edx, [esp + 0x8c]
call fcn.665daea0
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0xb0], eax
xor eax, eax
mov dword [esp + 0xb4], edx
mov word [esp + 0xb8], ax
imul edi, esi, 0x58
cmp dword [esp + 0x40], 1
lea edx, [ebx + edi]
movzx eax, byte [edx + 0xa4]
jne 0x66663fd0
test al, al
jne 0x666640d4
mov dword [esp], 0
mov edx, dword [esp + 0x64]
mov eax, ebp
xor ecx, ecx
mov dword [esp + 4], 0
call fcn.6665e020
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x666639a8
mov ebx, dword [esp + 0x64]
cmp byte [ebx + 0x10], 0
je 0x66663816
lea esi, [esi]
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x80]
lea ecx, [eax + 8]
mov eax, ebp
call fcn.66651410
mov eax, dword [ebp + 0x24]
mov esi, eax
test eax, eax
je 0x66663b70
lea eax, [ebp + 0x38]
xor ebx, ebx
mov edx, esi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x24]
test eax, eax
jg 0x66663aea
lea esi, [esi]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, dword [edi + 4]
cmp eax, esi
jne 0x66663c90
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x2c], eax
sub eax, ebx
mov dword [edi + 0x10], eax
sub dword [esi + 4], ebx
mov dword [esi], 0
mov esi, dword [esp + 0x30]
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x66663c78
mov eax, dword [esp + 0x64]
test eax, eax
je 0x66663a38
call fcn.66593730
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov edx, dword [esp + 0x100]
test edx, edx
je 0x66663a5f
mov esi, dword [esp + 0x100]
mov eax, dword [esp + 0xbc]
sub dword [esi], eax
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, eax
add eax, 1
mov edx, eax
mov eax, 0
shl ecx, 5
shl edx, 5
add eax, 0xffffffff
adc edx, 0xffffffff
mov dword [esp], eax
mov eax, ebp
mov dword [esp + 4], edx
xor edx, edx
call fcn.66651560
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x66663b0f
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x66663ada
mov eax, dword [ebp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_bind_int64
mov eax, dword [ebp + 0x38]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_step
mov eax, dword [ebp + 0x38]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_reset
mov dword [ebp + 0x24], eax
add ebx, 1
cmp dword [esp + 0x24], ebx
je 0x666639e8
mov edx, dword [ebp + 0x24]
mov edi, dword [esp + 0x28]
lea eax, [ebx + ebx*2]
shl eax, 2
add eax, dword [edi + 8]
mov eax, dword [eax]
mov edi, eax
mov esi, eax
sar edi, 0x1f
test edx, edx
je 0x66663a70
mov eax, dword [ebp + 0x38]
test eax, eax
jne 0x66663ada
mov eax, dword [ebp]
mov edx, dword [eax + 8]
mov dword [esp + 8], edx
mov eax, dword [eax + 4]
mov dword [esp], 0x66686824
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov edx, dword [esp + 0x48]
mov ecx, eax
mov eax, ebp
call fcn.66644c80
jmp 0x66663a9f
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x66663ce0
mov eax, dword [esp + 0x2c]
cmp dword [eax + 0x10], 0x7cf
jle 0x66663d48
mov dword [ebp + 0x24], 0xd
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x64]
cmp byte [eax + 0x10], 0
mov dword [esp + 0x48], eax
jne 0x666639ca
mov edi, dword [eax + 0x30]
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
test edi, edi
jle 0x6666418a
lea ebx, [eax + 0x50]
lea eax, [ebp + 0x24]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x4c], eax
jmp 0x66663c54
mov eax, dword [eax]
mov edi, dword [ebx + 0x20]
mov edx, eax
mov eax, 0
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], eax
mov esi, eax
mov eax, dword [ebx + 0x1c]
shl edx, 5
mov edi, edx
mov dword [esp + 0x44], edx
cdq
add eax, esi
adc edx, edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov ecx, edx
mov edx, eax
mov eax, ebp
call fcn.6665c1b0
mov edi, eax
test eax, eax
je 0x66663c30
mov ecx, dword [eax + 4]
cmp ecx, 3
jle 0x66663f78
mov eax, dword [eax + 8]
cmp ecx, eax
jl 0x66663f78
cmp dword [esp + 0x30], eax
jle 0x66663e30
mov dword [ebp + 0x24], 0x10b
mov dword [esp], edi
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x48]
add dword [esp + 0x2c], 1
mov edi, dword [esp + 0x2c]
cmp edi, dword [eax + 0x30]
jge 0x66663f58
mov edx, dword [ebp + 0x24]
add ebx, 0x58
test edx, edx
jne 0x66663f58
mov eax, dword [ebx]
test eax, eax
je 0x66663c30
mov esi, dword [ebx + 0xc]
test esi, esi
jne 0x66663bc0
mov dword [eax + 8], 0
mov dword [eax + 4], 0
jmp 0x66663c30
mov esi, dword [esp + 0x38]
sub eax, 1
sub dword [esi + 4], 1
mov dword [edi + 0x10], eax
jmp 0x66663a2b
sub eax, esi
mov edx, dword [edi + 8]
lea eax, [eax + eax*2]
shl eax, 2
mov dword [esp], edx
mov dword [esp + 8], eax
lea eax, [esi + esi*2]
lea eax, [edx + eax*4]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memmove
jmp 0x666639fb
mov edi, dword [esp + 0x2c]
lea eax, [ebx + 2]
cmp dword [edi + 0x14], eax
sete al
movzx eax, al
mov dword [esp + 0x4c], eax
jmp 0x666637b3
lea ecx, [ebp + 0x24]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 0x14]
lea edx, [ecx - 1]
mov dword [esp + 0x30], ecx
cmp ebx, edx
je 0x66663d96
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
test ecx, ecx
je 0x6666387c
mov eax, dword [esp + 0x68]
mov dword [esp + 8], ecx
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 0x58], ecx
call sub.msvcrt.dll_memcmp
mov ecx, dword [esp + 0x58]
test eax, eax
je 0x6666387c
jmp 0x66663838
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
call fcn.6658a6f0
mov ecx, dword [esp + 0x2c]
lea edx, [ebp + 0x24]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x24]
mov ecx, dword [ecx + 0x14]
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ecx
sub ecx, 1
cmp ecx, ebx
jne 0x66663d96
test eax, eax
mov edx, dword [esp + 0x38]
jne 0x66663d90
lea eax, [ebp + 0x24]
mov dword [esp + 0x2c], edx
call fcn.665d61b0
mov eax, dword [ebp + 0x24]
mov edx, dword [esp + 0x2c]
mov ecx, dword [edx]
mov dword [esp + 0x2c], ecx
test eax, eax
jne 0x66663a5f
mov dword [esp], 0
mov eax, dword [esp + 0x28]
mov ecx, edi
mov edx, dword [esp + 0x2c]
call fcn.665d90b0
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x66663a5f
mov eax, dword [esp + 0x2c]
lea ecx, [esi + 0x18]
lea edx, [esp + 0x80]
add ecx, eax
lea esi, [eax + esi + 0x24]
mov eax, ebp
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x38], esi
call fcn.66644cf0
lea eax, [edi + edi*2]
mov edi, dword [esp + 0x2c]
lea edx, [edi + eax*4]
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 0x20]
lea esi, [eax + eax*2]
add eax, 1
lea esi, [ecx + esi*4]
mov dword [edx + 0x1c], eax
mov dword [esp + 0x30], esi
mov eax, esi
mov dword [esi + 4], 1
mov esi, dword [esp + 0x24]
mov dword [eax], esi
lea eax, [ebx + ebx*2]
add dword [edi + 0x10], 1
mov eax, dword [edi + eax*4 + 0x1c]
mov dword [esp + 0x24], eax
jmp 0x6666379d
mov dword [esp + 0x78], 0
xor eax, eax
cmp ecx, dword [esp + 0x7c]
ja 0x66663f90
mov edx, dword [esp + 0x74]
mov dword [edx + eax], 0
add dword [esp + 0x78], 4
mov eax, dword [ebx + 0x40]
mov esi, dword [esp + 0x4c]
lea edx, [esp + 0x74]
mov dword [esp], eax
sar eax, 0x1f
mov dword [esp + 4], eax
mov eax, esi
call fcn.665daea0
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
lea edx, [esp + 0x74]
mov dword [esp], eax
mov eax, esi
call fcn.665da120
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x30]
mov eax, esi
sub ecx, edx
add edx, dword [edi]
mov dword [esp], edx
lea edx, [esp + 0x74]
call fcn.665da120
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x66663eb5
movzx eax, word [esp + 0x78]
mov edx, dword [esp + 0x74]
rol ax, 8
mov word [edx + 2], ax
mov eax, dword [esp + 0x78]
lea ecx, [eax + 9]
cmp ecx, dword [esp + 0x7c]
ja 0x66664078
mov edx, dword [esp + 0x74]
mov byte [edx + eax], 4
add dword [esp + 0x78], 1
mov eax, dword [ebx + 0x1c]
cmp dword [ebx + 8], eax
je 0x66664018
mov edx, dword [ebx]
mov esi, dword [ebp + 0x24]
mov dword [edx + 4], eax
test esi, esi
jne 0x66663c28
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
add edx, 1
mov dword [esp], eax
mov eax, ebp
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x3c]
adc ecx, 0
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x30]
call fcn.66651560
mov ecx, dword [ebp + 0x24]
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
test ecx, ecx
jne 0x66663c28
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x3c]
mov dword [esp], eax
mov edx, dword [esp + 0x38]
mov eax, ebp
call fcn.66650430
jmp 0x66663c28
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov dword [eax], edi
jmp 0x66663a2b
mov dword [ebp + 0x24], 0x10b
mov dword [esp], edi
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x66663c30
mov esi, dword [esp + 0x4c]
lea edx, [esp + 0x74]
mov eax, esi
call fcn.665da050
mov eax, dword [esp + 0x78]
lea ecx, [eax + 4]
cmp ecx, dword [esp + 0x7c]
jbe 0x66663e44
lea edx, [esp + 0x74]
mov eax, esi
call fcn.665da050
test eax, eax
jne 0x66663e54
mov eax, dword [esp + 0x78]
jmp 0x66663e44
mov edx, dword [edx + 0xa0]
lea eax, [eax + edx*2]
lea edx, [esp + 0x8c]
mov dword [esp], eax
sar eax, 0x1f
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
call fcn.665daea0
mov dword [esp], 0x66650ab0
lea edx, [ebx + edi + 0x50]
mov eax, ebp
lea ecx, [esp + 0x80]
call fcn.66663100
jmp 0x66663973
mov edx, dword [ebx + 0x28]
mov ecx, dword [edi + 8]
cmp edx, ecx
jge 0x66663edf
mov esi, dword [edi + 4]
cmp dword [ebx + 0x24], esi
jg 0x66663edf
sub edx, ecx
add edx, dword [esp + 0x78]
mov esi, dword [esp + 0x4c]
lea eax, [edx - 5]
lea edx, [esp + 0x74]
mov dword [esp], eax
sar eax, 0x1f
mov dword [esp + 4], eax
mov eax, esi
call fcn.665daea0
mov eax, dword [ebx + 0x24]
mov ecx, dword [edi + 4]
lea edx, [esp + 0x74]
sub ecx, eax
add eax, dword [edi]
mov dword [esp], eax
mov eax, esi
call fcn.665da120
mov eax, dword [ebx + 0x1c]
jmp 0x66663edf
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x74]
call fcn.665da050
test eax, eax
jne 0x66663ed3
mov eax, dword [esp + 0x78]
jmp 0x66663ec6
mov dword [esp], edi
mov eax, ebp
lea edx, [esp + 0x80]
call fcn.666510e0
mov dword [esp + 0x50], 1
mov eax, dword [ebp + 0x24]
jmp 0x666638b3
sub eax, dword [esp + 0xb0]
sbb edx, dword [esp + 0xb4]
jmp 0x6666391c
mov eax, dword [esp + 0x90]
lea ecx, [eax + 9]
cmp ecx, dword [esp + 0x94]
ja 0x66664191
mov edx, dword [esp + 0x8c]
mov byte [edx + eax], 0
add dword [esp + 0x90], 1
imul esi, esi, 0x58
mov eax, dword [ebx + esi + 0xa0]
test eax, eax
jle 0x66663973
mov eax, dword [esp + 0x90]
lea ecx, [eax + 9]
cmp ecx, dword [esp + 0x94]
ja 0x666641b5
mov edx, dword [esp + 0x8c]
mov byte [edx + eax], 0
add dword [esp + 0x90], 1
jmp 0x66663973
movzx eax, word [esp + 0x90]
mov edx, dword [esp + 0x8c]
rol ax, 8
mov word [edx], ax
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov dword [esp], eax
mov eax, ebp
mov dword [esp + 4], edx
lea edx, [esp + 0x80]
call fcn.66650690
jmp 0x66663905
lea edx, [esp + 0x80]
mov eax, ebp
call fcn.66650960
jmp 0x666638f7
xor eax, eax
jmp 0x66663f5c
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x8c]
call fcn.665da050
test eax, eax
jne 0x666640fe
mov eax, dword [esp + 0x90]
jmp 0x666640eb
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x8c]
call fcn.665da050
test eax, eax
jne 0x66663973
mov eax, dword [esp + 0x90]
jmp 0x66664127