Function at 0x6665f720
Capabilities:
Encode data using xor
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
sub esp, 0x8c
mov eax, dword [esp + 0xa4]
mov ebx, dword [esp + 0xb4]
mov dword [esp + 0x40], ecx
mov ecx, dword [ebp + 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x50], ebx
mov esi, dword [esp + 0xa0]
xor ebx, ebx
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0xac]
mov eax, dword [esp + 0xb0]
test ecx, ecx
jne 0x6665f78e
test edi, edi
js 0x6665f93e
mov ebx, dword [esp + 0x10]
lea edx, [edi + edi*2]
lea edx, [ebx + edx*4]
cmp dword [edx + 0x1c], eax
cmovle eax, dword [edx + 0x1c]
mov ebx, eax
mov edx, ebx
mov eax, ebp
call fcn.665cd0b0
mov ecx, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x50]
mov dword [eax], ecx
test ecx, ecx
je 0x6665f933
mov edx, dword [esp + 0x40]
mov dword [ecx + 0x28], esi
mov eax, edx
and eax, 2
mov dword [esp + 0x54], eax
setne al
movzx eax, al
mov dword [ecx + 0x34], eax
mov eax, edx
shr eax, 4
and eax, 1
and edx, 0x20
mov byte [ecx + 0x38], al
jne 0x6665f7eb
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x6665f920
mov edx, dword [esp + 0x3c]
lea eax, [ebp + 0x24]
call fcn.665db300
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x48], eax
mov esi, dword [esp + 0x48]
test esi, esi
jne 0x6665f920
test edi, edi
js 0x6665f97c
mov eax, dword [esp + 0x3c]
lea esi, [eax + 0x50]
sub ebx, 1
js 0x6665f84f
mov ecx, dword [esp + 0x10]
lea eax, [edi + edi*2]
lea edi, [ecx + eax*4]
lea esi, [esi]
mov edx, dword [edi + 0x20]
lea eax, [ebx + ebx*2]
lea edx, [edx + eax*4]
mov eax, dword [edx + 4]
test eax, eax
je 0x6665f839
mov ecx, esi
mov eax, ebp
call fcn.6665cb30
sub ebx, 1
add esi, 0x58
cmp ebx, 0xffffffff
jne 0x6665f820
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x6665f920
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x3c]
mov eax, dword [eax + 0x30]
lea ebx, [eax - 1]
mov dword [esp + 0x10], eax
test ebx, ebx
jle 0x6665f8ab
lea esi, [esi]
mov edx, ebx
mov eax, edi
call fcn.6658ccc0
mov esi, eax
test eax, eax
je 0x6665f8a6
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x6665f898
imul eax, esi, 0x58
mov dword [esp + 8], 0
mov dword [esp], ebp
lea edx, [edi + eax + 0x50]
mov dword [esp + 4], edx
call dword [edi + eax + 0x68]
mov dword [esp], ebx
mov ecx, esi
mov edx, edi
mov eax, ebp
call fcn.6658ce20
sub ebx, 1
jne 0x6665f868
mov edi, dword [esp + 0x3c]
mov eax, dword [edi + 0x48]
movzx ebx, word [eax + 4]
imul ecx, ebx, 0x58
add ecx, edi
mov esi, dword [ecx + 0x5c]
test esi, esi
sete byte [edi + 0x10]
mov eax, dword [ecx + 0x98]
mov edx, dword [ecx + 0x9c]
cmp byte [edi + 0x38], 0
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], edx
je 0x6665f950
mov edi, dword [ebp + 0x24]
test edi, edi
jne 0x6665f950
test esi, esi
je 0x6665f933
mov esi, dword [ecx + 0xa0]
test esi, esi
jne 0x6665f954
mov dword [esp + 0xa0], 0
mov edx, dword [esp + 0x3c]
mov eax, ebp
xor ecx, ecx
mov dword [esp + 0xa4], 0
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6665e020
mov eax, dword [esp + 0x3c]
call fcn.66593730
mov eax, dword [esp + 0x50]
mov dword [eax], 0
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
xor ebx, ebx
test eax, eax
setne bl
add ebx, dword [edx + 0x10]
jmp 0x6665f78e
test esi, esi
je 0x6665f933
imul ebx, ebx, 0x58
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xa0], esi
lea eax, [esi + ebx + 0x50]
mov dword [esp + 0xa4], eax
mov eax, dword [esi + 0x2c]
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
jmp eax
mov ebx, dword [esp + 0x10]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x14]
lea eax, [eax + eax*2]
lea eax, [ebx + eax*4 + 0x18]
mov dword [esp + 0x5c], eax
lea eax, [ebx + 0x18]
mov dword [esp + 0x20], eax
test edi, edi
je 0x6665faf3
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x6665f9b3
test byte [esp + 0x40], 8
je 0x6666031e
lea eax, [edi + 0x10]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov dword [esp], eax
mov eax, edi
call fcn.665d9dd0
mov ebx, dword [ebp + 0xc]
mov dword [ebp + 0x24], eax
mov esi, dword [ebx + 0x10]
test esi, esi
je 0x6665fab5
lea edi, [esi + 0x28]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, esi
xor ecx, ecx
mov dword [esp + 0x10], eax
mov eax, ebx
call fcn.6659c510
mov edx, dword [ebp + 0x24]
test edx, edx
jne 0x6665fab5
mov eax, dword [esi + 0x10]
mov dword [esp], edi
lea ebx, [ebp + 0x24]
mov dword [esp + 0x18], eax
call sub.msvcrt.dll_strlen
mov edx, 0xc
xor ecx, ecx
mov dword [esp + 0x14], eax
mov eax, ebx
call fcn.665cc500
mov esi, eax
test eax, eax
je 0x6665fab5
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
sub eax, 0x29
sub eax, ecx
mov dword [esp + 0x18], eax
lea eax, [edi + ecx + 1]
mov dword [esi], eax
mov eax, dword [esp + 0x3c]
mov dword [eax + 0x90], 0
lea ecx, [eax + 0x50]
lea edx, [eax + 0x8c]
mov eax, ebx
mov dword [esp], edi
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x14]
call fcn.665da120
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
mov dword [esi + 8], ecx
lea edx, [ebx + 0x98]
mov dword [esi + 4], ecx
mov dword [ebx + 0x5c], esi
call fcn.66585c70
movzx eax, al
mov dword [ebx + 0x64], eax
mov eax, dword [esi + 4]
mov dword [ebx + 0x78], eax
mov eax, dword [esp + 0x54]
test eax, eax
jne 0x666604c2
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x6665fab5
mov edx, dword [esp + 0x10]
mov eax, dword [ebp]
call fcn.6658c9a0
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 0x54]
test al, 2
jne 0x6666030e
mov eax, dword [ebp]
cmp dword [eax + 0x30], 1
mov eax, dword [esp + 0x3c]
je 0x666604b6
mov dword [eax + 0x68], 0x6665c5f0
mov dword [esp + 0x48], 1
mov ebx, dword [esp + 0x20]
cmp dword [esp + 0x5c], ebx
ja 0x6665fb01
jmp 0x6665f844
mov ebx, dword [esp + 0x20]
cmp dword [esp + 0x5c], ebx
jbe 0x6665f84f
mov dword [esp + 0x18], ebp
lea esi, [esi]
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 4]
mov dword [esp + 0x4c], eax
sub eax, 1
mov dword [esp + 0x10], eax
js 0x6665fd77
imul eax, dword [esp + 0x48], 0x58
mov ebx, dword [esp + 0x3c]
lea ebp, [ebx + eax + 0x54]
lea esi, [esi]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
lea ecx, [ebp - 4]
mov dword [esp + 0x28], ecx
mov edx, dword [esi + 8]
lea eax, [eax + eax*2]
lea ebx, [edx + eax*4]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x6665fd48
lea edi, [ebp + 4]
mov ecx, ebp
xor eax, eax
mov dword [ebp], 0
and edi, 0xfffffffc
mov dword [ebp + 0x50], 0
sub ecx, edi
add ecx, 0x54
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [ebp - 4], ebx
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 0x3c]
test esi, esi
je 0x666600c0
mov eax, dword [esp + 0x18]
mov edi, dword [eax + 0x24]
test edi, edi
jne 0x6665fd5a
mov eax, dword [ebx]
mov dword [esp + 4], 1
mov edi, 1
mov dword [esp], esi
mov dword [esp + 8], eax
sar eax, 0x1f
mov dword [esp + 0xc], eax
call sym.libsqlite3_0.dll_sqlite3_bind_int64
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov edx, 2
mov dword [esp], eax
mov eax, esi
call fcn.665b2d30
mov dword [esp], esi
call sym.libsqlite3_0.dll_sqlite3_step
mov dword [esp + 0x34], 0
cmp eax, 0x64
je 0x66660100
mov dword [esp], esi
call sym.libsqlite3_0.dll_sqlite3_reset
mov ecx, dword [esp + 0x18]
mov edx, 2
mov dword [ecx + 0x24], eax
mov eax, esi
call fcn.665b2b50
test eax, eax
jne 0x6665fc2a
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x6665fc2a
mov dword [esp], eax
call dword [0x6667ce58]
mov eax, dword [ebx + 4]
cmp eax, edi
jle 0x6665fc3b
mov dword [esp + 0x34], 0
mov edi, eax
mov eax, dword [esp + 0x40]
sub edi, 1
mov esi, dword [esp + 0x18]
mov dword [ebp + 4], edi
mov edx, dword [esp + 0x28]
and eax, 8
mov dword [esp + 0x30], eax
mov eax, esi
call fcn.6665c3e0
mov eax, dword [ebp + 8]
test eax, eax
je 0x66660080
mov esi, dword [eax]
mov ebx, dword [eax + 8]
lea edx, [esp + 0x78]
mov dword [esp + 0x70], 0
mov edi, dword [eax + 4]
mov dword [esp + 0x74], 0
lea eax, [esi + ebx]
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], edi
call fcn.66585e40
mov edx, dword [esp + 0x78]
mov dword [esp + 0x6c], edx
cmp edi, edx
jl 0x66660094
mov dword [esp + 0x58], ebp
add ebx, eax
xor esi, esi
lea esi, [esi]
lea eax, [edx + 1]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + edx]
movzx edi, byte [ecx]
mov eax, edi
mov dword [esp + 0x74], edi
test al, al
js 0x6665fd98
cmp dword [esp + 0x70], esi
jb 0x6665fdb5
je 0x6665ff88
mov edi, dword [esp + 0x24]
cmp edi, ebx
jle 0x66660010
mov ebp, dword [esp + 0x14]
lea edx, [esp + 0x70]
lea eax, [ebp + ebx]
call fcn.66585e40
add ebx, eax
mov eax, dword [esp + 0x70]
add eax, dword [esp + 0x78]
mov dword [esp + 0x78], eax
cmp edi, eax
jle 0x66660090
lea edx, [eax + 1]
lea edi, [ebp + eax]
mov dword [esp + 0x6c], edx
movzx ebp, byte [edi]
mov ecx, ebp
mov dword [esp + 0x70], ebp
test cl, cl
jns 0x6665fcb0
mov dword [esp + 0x6c], eax
lea edx, [esp + 0x70]
mov eax, edi
call fcn.66585e40
add eax, dword [esp + 0x6c]
mov edx, eax
jmp 0x6665fcb0
mov eax, dword [ebx + 4]
test eax, eax
je 0x6665fd5a
mov eax, dword [esp + 0x18]
mov edx, ebx
call fcn.6665cb30
sub dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
add ebp, 0x58
cmp eax, 0xffffffff
jne 0x6665fb30
mov ebx, dword [esp + 0x4c]
add dword [esp + 0x48], ebx
add dword [esp + 0x20], 0xc
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x5c], eax
ja 0x6665fb08
mov ebp, dword [esp + 0x18]
jmp 0x6665f844
mov dword [esp + 0x6c], edx
mov eax, ecx
lea edx, [esp + 0x74]
call fcn.66585e40
add dword [esp + 0x6c], eax
cmp dword [esp + 0x70], esi
jae 0x6665fcd9
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x58]
test ecx, ecx
je 0x6666026d
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x38], eax
mov eax, ecx
mov esi, dword [esp + 0x38]
xor edi, edi
cdq
mov eax, dword [esp + 0x24]
add esi, ecx
adc edi, edx
cdq
cmp dword [esp + 0x24], esi
sbb edx, edi
jl 0x66660094
mov esi, dword [esp + 0x38]
test esi, esi
je 0x66660094
mov eax, dword [ebp + 4]
mov edx, dword [esp + 0x1c]
add ecx, esi
lea edi, [ebp + 0x38]
mov esi, dword [esp + 0x18]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x1c], ecx
mov ecx, dword [esp + 0x70]
mov dword [ebp + 0x18], eax
add esi, 0x24
mov dword [ebp + 0x3c], 0
mov eax, esi
mov dword [esp], edx
mov edx, edi
call fcn.665da120
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x6c]
mov edx, edi
mov dword [esp], eax
mov ecx, dword [esp + 0x74]
mov eax, esi
call fcn.665da120
cmp dword [esp + 0x24], ebx
jg 0x6666047b
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
add eax, 1
mov dword [ebp + 0x24], eax
mov dword [ebp + 0x20], ebx
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
mov edx, esi
mov eax, ebx
call fcn.6665c4c0
mov edx, dword [ebx + 0x24]
test edx, edx
jne 0x6665fe88
mov eax, dword [ebx]
mov edx, esi
call fcn.6658c9a0
mov edx, dword [ebx + 0x24]
lea esi, [esi]
nop
mov esi, dword [esp + 0x30]
mov eax, dword [ebp]
or esi, edx
jne 0x6665ff6d
mov edx, eax
mov ecx, dword [ebp + 8]
or edx, 1
mov dword [ebp], edx
test ecx, ecx
je 0x666600f8
mov ebx, dword [esp + 0x54]
test ebx, ebx
je 0x66660120
mov edi, dword [esp + 0x34]
or eax, 3
mov dword [ebp], eax
mov edx, eax
test edi, edi
jne 0x66660128
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x14], eax
test eax, eax
je 0x66660174
mov esi, dword [eax + 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ebx, esi
mov dword [esp + 0x34], esi
sar ebx, 0x1f
mov edx, eax
mov eax, 0
shl edx, 5
add eax, esi
adc edx, ebx
mov ecx, edx
mov edx, eax
mov eax, dword [esp + 0x18]
call fcn.6665c1b0
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x14]
test esi, esi
je 0x6665ff5d
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x34]
mov dword [ebp + 8], esi
mov dword [ebp + 4], eax
mov eax, dword [esi]
movzx ebx, byte [eax]
movzx edx, byte [eax + 1]
shl ebx, 8
add ebx, edx
lea edx, [ebp + 0x44]
movzx ebx, bx
add eax, ebx
call fcn.66585c70
mov edx, dword [esi + 8]
movzx eax, al
add ebx, eax
mov eax, dword [esi + 4]
mov dword [ebp + 0x10], ebx
cmp edx, eax
jl 0x6666045e
add eax, 1
mov dword [ebp + 0x24], eax
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
call fcn.665cc2a0
mov eax, dword [ebp]
test al, 2
je 0x66660060
mov dword [ebp + 0x14], 0x6665cce0
jmp 0x6665fd5a
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x74]
sub edx, esi
mov dword [esp + 0x38], eax
cmp edx, eax
cmova edx, eax
xor eax, eax
test edx, edx
je 0x6665ffd5
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x44], ebx
add edi, dword [esp + 0x6c]
add ecx, esi
jmp 0x6665ffc3
add eax, 1
cmp edx, eax
je 0x666600b0
movzx ebx, byte [ecx + eax]
lea ebp, [esi + eax]
cmp byte [edi + eax], bl
je 0x6665ffb8
mov ebx, dword [esp + 0x44]
mov esi, ebp
cmp dword [esp + 0x2c], esi
je 0x666602ef
cmp dword [esp + 0x38], eax
jbe 0x6665fcdf
mov ecx, dword [esp + 0x1c]
add eax, dword [esp + 0x14]
add eax, dword [esp + 0x6c]
movzx ecx, byte [ecx + esi]
cmp byte [eax], cl
ja 0x6665fdb5
mov edi, dword [esp + 0x24]
cmp edi, ebx
jg 0x6665fceb
lea esi, [esi]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x58]
test edx, edx
je 0x6666026d
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x18]
jmp 0x6666003c
mov ebx, dword [eax + 8]
cmp ebx, dword [eax + 4]
jl 0x6666028b
mov eax, edi
mov edx, esi
call fcn.6665c3e0
mov eax, dword [ebp + 8]
test eax, eax
jne 0x66660030
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x24]
jmp 0x6665fe88
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
cmp dword [eax + 0x30], 1
je 0x66660168
mov dword [ebp + 0x14], 0x6665c5f0
jmp 0x6665fd5a
mov edx, dword [esi + 0x24]
jmp 0x6665fe88
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x18]
mov edx, 0x10b
mov dword [eax + 0x24], 0x10b
jmp 0x6665fe88
mov ebx, dword [esp + 0x44]
add esi, eax
jmp 0x6665ffd5
mov esi, eax
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov dword [esp + 8], edx
mov eax, dword [eax + 4]
mov dword [esp], str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_DESC_LIMIT_1
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
lea edx, [esi + 0x3c]
mov ecx, eax
mov eax, esi
call fcn.66644c80
mov esi, dword [esi + 0x3c]
jmp 0x6665fb88
mov eax, edx
jmp 0x6665ff6d
mov dword [esp + 4], 0
mov dword [esp], esi
call sym.libsqlite3_0.dll_sqlite3_column_int
mov edi, eax
and eax, 1
mov dword [esp + 0x34], eax
sar edi, 1
jmp 0x6665fbf9
mov ebx, dword [esp + 0x34]
test ebx, ebx
je 0x666600f8
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 0x18]
and edx, 2
mov eax, dword [eax]
cmp ebx, dword [ebp + 4]
jne 0x66660140
mov esi, dword [ecx + 8]
cmp dword [ebp + 0x24], esi
jl 0x66660151
mov dword [esp], ebx
mov ecx, eax
mov eax, dword [esp + 0x18]
call fcn.6665d830
mov dword [ebp + 0x34], eax
mov esi, dword [esp + 0x54]
test esi, esi
je 0x6665ff6a
jmp 0x6665feca
mov dword [ebp + 0x14], 0x6665c940
jmp 0x6665fd5a
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 4]
mov ecx, 0xd
mov eax, 4
cmp dword [ebp + 0x18], esi
je 0x66660262
mov edx, dword [ebx]
jmp 0x6666019c
cmp eax, ecx
jge 0x666601a6
add eax, 1
cmp byte [edx + eax - 1], 0
js 0x66660198
mov dword [ebp + 0x10], eax
mov eax, dword [ebx + 8]
cmp dword [ebp + 0x24], eax
jl 0x6665ff5d
mov ebx, dword [esp + 0x18]
mov edi, dword [ebp - 4]
lea eax, [esi + 1]
mov ebx, dword [ebx + 0x24]
mov dword [esp + 0x34], ebx
test ebx, ebx
jne 0x6665ff5d
mov esi, eax
mov dword [esp + 0x38], ebp
mov ebx, eax
mov ebp, eax
sar esi, 0x1f
jmp 0x66660254
mov eax, dword [edi]
mov edx, eax
mov eax, 0
shl edx, 5
add eax, ebx
adc edx, esi
mov ecx, edx
mov edx, eax
mov eax, dword [esp + 0x18]
call fcn.6665c1b0
test eax, eax
je 0x66660240
mov edx, dword [eax + 8]
mov ecx, dword [eax]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x30], edx
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
shl edx, 8
add dx, cx
je 0x6666022e
mov edx, dword [esp + 0x14]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x14], eax
mov eax, edx
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov ecx, dword [esp + 0x30]
cmp dword [esp + 0x24], ecx
jl 0x66660259
mov eax, dword [esp + 0x18]
add ebp, 1
add ebx, 1
adc esi, 0
mov eax, dword [eax + 0x24]
test eax, eax
jne 0x66660259
cmp dword [edi + 8], ebp
jge 0x666601e0
mov ebp, dword [esp + 0x38]
jmp 0x6665ff09
mov eax, dword [ebp + 0x1c]
lea ecx, [eax + 9]
jmp 0x6666018d
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x18]
mov dword [ebp + 8], 0
mov edx, dword [eax + 0x24]
jmp 0x6665fe88
mov esi, dword [eax]
lea edx, [esp + 0x6c]
lea eax, [esi + ebx]
mov dword [esp + 0x14], esi
call fcn.66585e40
mov ecx, eax
mov eax, dword [esp + 0x6c]
cmp eax, 3
jle 0x66660094
mov edx, dword [ebp + 8]
cmp eax, dword [edx + 8]
jge 0x66660094
add ebx, ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x78], eax
lea edx, [esp + 0x74]
add eax, esi
mov dword [esp + 0x70], 0
mov dword [esp + 0x24], ecx
call fcn.66585e40
add eax, dword [esp + 0x6c]
mov dword [esp + 0x6c], eax
mov ecx, eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], eax
jmp 0x6665fdd1
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x58]
test esi, esi
jne 0x66660305
cmp dword [esp + 0x38], eax
jne 0x6666026d
mov ecx, dword [esp + 0x6c]
jmp 0x6665fdd1
mov eax, dword [esp + 0x3c]
mov dword [eax + 0x68], 0x6665cce0
jmp 0x6665fadc
mov edx, dword [esp + 0x2c]
mov esi, dword [edi + 0xc]
mov eax, 0xd
sub edx, 1
js 0x6666034f
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x1c]
movzx ebx, byte [edi + edx]
lea ecx, [eax*8]
xor ecx, ebx
xor eax, ecx
sub edx, 1
jae 0x66660337
mov edi, dword [esp + 0x10]
xor edx, edx
div esi
mov eax, dword [edi + 0x14]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x666604a0
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0x1c]
mov edi, ebx
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x2c]
jmp 0x66660382
mov edi, dword [edi]
test edi, edi
je 0x6666049c
mov eax, dword [edi + 0x14]
add eax, 1
cmp ebp, eax
jne 0x66660378
lea eax, [edi + 0x28]
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x66660378
mov eax, dword [0x6667ced0]
mov ebx, edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x14], ebp
mov esi, dword [ebx + 0x10]
mov ebp, dword [esp + 0x10]
test eax, eax
jne 0x666604e6
call fcn.66587320
test eax, eax
jne 0x666604dd
call fcn.665cb300
test eax, eax
jne 0x666604dd
mov eax, dword [esp + 0x2c]
lea ecx, [eax + 0x29]
sub esi, ecx
mov dword [esp + 0x18], ecx
lea eax, [esi + 0x16]
mov dword [esp + 0x10], esi
cdq
call fcn.6658bcf0
mov esi, eax
test eax, eax
je 0x666604dd
mov ecx, dword [esp + 0x18]
lea edx, [eax + 0xc]
mov dword [esp], edx
lea eax, [ebx + ecx]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0x18]
mov eax, esi
mov edx, ebx
lea ebx, [ebp + 0x24]
sub eax, ecx
lea ecx, [eax + 0xc]
mov eax, edi
call fcn.6659c510
add eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov dword [ebp + 0x24], 0
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
mov dword [esi], edx
mov edi, dword [esp + 0x1c]
or dword [eax + 0x54], 1
jmp 0x6665fa43
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx]
add eax, edx
lea edx, [esp + 0x7c]
call fcn.66585e40
mov eax, dword [esp + 0x7c]
mov dword [ebp + 0x24], eax
jmp 0x6665ff5d
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x7c]
add eax, ebx
call fcn.66585e40
add ebx, eax
mov eax, dword [esp + 0x7c]
add eax, dword [esp + 0x78]
mov dword [ebp + 0x24], eax
jmp 0x6665fe5c
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx + 0x54]
mov dword [esp + 0x10], eax
or eax, 1
mov dword [ebx + 0x54], eax
jmp 0x6665fabc
mov dword [eax + 0x68], 0x6665c940
jmp 0x6665fadc
mov ebx, dword [esp + 0x3c]
mov edx, dword [esp + 0x10]
mov eax, ebp
or dword [ebx + 0x54], 2
call fcn.665cc2a0
mov eax, dword [ebx + 0x54]
jmp 0x6665fabc
mov dword [ebp + 0x24], 7
jmp 0x666604a0
lock or dword [esp], 0
jmp 0x666603db