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

Disassembly:
push ebp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x4c
mov edi, dword [0x6667ced0]
mov dword [edx], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
test edi, edi
jne 0x6661f380
call fcn.66587320
test eax, eax
jne 0x6661f373
call fcn.665cb300
test eax, eax
je 0x6661f385
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lock or dword [esp], 0
xor ebp, ebp
cmp byte [0x6667ce04], 0
mov eax, dword [esp + 0x2c]
je 0x6661f39d
test ah, 0x80
je 0x6661f73b
test eax, 0x40000
je 0x6661f723
and eax, 0xfffdffff
and eax, 0xfff600e7
xor edx, edx
mov dword [esp + 0x2c], eax
mov eax, 0x208
call fcn.6658bcf0
mov ebx, eax
test eax, eax
je 0x6661f6c1
lea edi, [eax + 4]
mov ecx, eax
mov dword [eax], 0
mov dword [eax + 0x204], 0
and edi, 0xfffffffc
xor eax, eax
sub ecx, edi
add ecx, 0x208
shr ecx, 2
rep stosd dword es:[edi], eax
test ebp, ebp
je 0x6661f425
cmp byte [0x6667ce04], 0
je 0x6661f923
mov dword [esp], 1
call dword [0x6667ce48]
mov dword [ebx + 0xc], eax
test eax, eax
je 0x6661f923
mov dword [esp], eax
call dword [0x6667ce50]
mov edx, dword [0x6668b960]
xor ecx, ecx
lea eax, [ebx + 0x1b8]
mov byte [ebx + 0x51], 1
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x70], edx
mov edx, dword [0x6668b964]
mov word [ebx + 0x124], cx
mov ecx, 1
mov dword [ebx + 0x74], edx
mov edx, dword [0x6668b968]
mov byte [ebx + 0x56], 0xff
mov dword [ebx + 0x78], edx
mov edx, dword [0x6668b96c]
mov dword [ebx + 0x44], 0xff
mov dword [ebx + 0x7c], edx
mov edx, dword [0x6668b970]
mov dword [ebx + 0x14], 2
mov dword [ebx + 0x80], edx
mov edx, dword [0x6668b974]
mov dword [ebx + 0x64], 0xf03b7906
mov dword [ebx + 0x84], edx
mov edx, dword [0x6668b978]
mov dword [ebx + 0x120], 1
mov dword [ebx + 0x88], edx
mov edx, dword [0x6668b97c]
mov dword [ebx + 0x9c], 0
mov dword [ebx + 0x8c], edx
mov edx, dword [0x6668b980]
mov dword [ebx + 0x90], edx
mov edx, dword [0x6668b984]
mov dword [ebx + 0x94], edx
mov edx, dword [0x6668b988]
mov dword [ebx + 0x98], edx
mov eax, dword [0x6667cea8]
mov edx, dword [0x6667ceac]
or dword [ebx + 0x20], 0xe00480e0
mov dword [ebx + 0x30], eax
mov eax, ebx
mov dword [ebx + 0x34], edx
mov edx, str.BINARY
mov dword [ebx + 0x60], 0
mov dword [ebx + 0xa0], 0x7fffffff
mov dword [ebx + 0x1a4], 0
mov dword [ebx + 0x1a0], 0
mov dword [ebx + 0x19c], 0
mov dword [ebx + 0x1a8], 0
mov dword [ebx + 0x178], 0
mov dword [ebx + 0x174], 0
mov dword [ebx + 0x170], 0
mov dword [ebx + 0x17c], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x665879e0
mov dword [esp], 0
call fcn.665b3ba0
mov dword [esp + 8], 0
mov ecx, 3
mov eax, ebx
mov dword [esp + 4], 0x665879e0
mov edx, str.BINARY
mov dword [esp], 0
call fcn.665b3ba0
mov dword [esp + 8], 0
mov ecx, 2
mov eax, ebx
mov dword [esp + 4], 0x665879e0
mov edx, str.BINARY
mov dword [esp], 0
call fcn.665b3ba0
mov dword [esp + 8], 0
mov ecx, 1
mov eax, ebx
mov dword [esp + 4], 0x66591910
mov edx, 0x666824a0
mov dword [esp], 0
call fcn.665b3ba0
mov dword [esp + 8], 0
mov ecx, 1
mov eax, ebx
mov dword [esp + 4], 0x66587a20
mov edx, str.RTRIM
mov dword [esp], 0
call fcn.665b3ba0
cmp byte [ebx + 0x53], 0
jne 0x6661f6b1
mov eax, dword [esp + 0x2c]
mov edx, 0x46
mov dword [ebx + 0x3c], eax
and eax, 7
bt edx, eax
jae 0x6661f8ed
lea eax, [esp + 0x38]
mov dword [esp], ebx
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
mov dword [esp + 8], eax
lea eax, [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x60]
call fcn.665f1620
mov edi, eax
test eax, eax
je 0x6661f754
cmp eax, 7
jne 0x6661f67e
mov dword [esp], ebx
call fcn.6658a200
mov edx, dword [esp + 0x38]
mov ecx, 0
mov eax, 0x6667eaa2
mov dword [esp + 4], edi
mov dword [esp], ebx
test edx, edx
mov dword [esp + 0xc], edx
cmove eax, ecx
mov dword [esp + 8], eax
call fcn.665b31b0
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x6661f6c1
mov dword [esp], eax
call dword [0x6667ce58]
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_errcode
mov ebp, eax
cmp eax, 7
je 0x6661f8dd
test eax, eax
je 0x6661f6df
mov dword [ebx + 0x64], 0x4b771290
mov eax, dword [esp + 0x34]
mov dword [esi], ebx
test eax, eax
jne 0x6661f6f3
jmp 0x6661f716
sub eax, 1
cmp byte [eax - 1], 0
jne 0x6661f6f0
cmp byte [eax - 2], 0
jne 0x6661f6f0
cmp byte [eax - 3], 0
jne 0x6661f6f0
cmp byte [eax - 4], 0
jne 0x6661f6f0
sub eax, 4
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
add esp, 0x4c
mov eax, ebp
pop ebx
movzx eax, al
pop esi
pop edi
pop ebp
ret
mov ebx, dword [0x6667cec8]
mov edx, eax
or edx, 0x20000
test ebx, ebx
cmovne eax, edx
jmp 0x6661f3ad
movzx ebp, byte [0x6667ce05]
test eax, 0x10000
mov edx, 1
cmovne ebp, edx
jmp 0x6661f39d
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov dword [esp + 4], 0
mov ecx, ebx
or ah, 1
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x10]
add eax, 4
mov dword [esp], eax
mov eax, dword [ebx]
call fcn.66604360
mov edx, eax
test eax, eax
jne 0x6661f967
mov edi, dword [ebx + 0x10]
mov edx, dword [edi + 4]
cmp byte [edx + 9], 0
je 0x6661f7aa
add dword [edx + 0xc], 1
cmp byte [edx + 0xa], 0
jne 0x6661f7aa
mov eax, edx
call fcn.6658e4e0
mov edi, dword [ebx + 0x10]
mov edx, dword [edi + 4]
mov eax, ebx
call fcn.6659f440
mov dword [edi + 0xc], eax
cmp byte [ebx + 0x53], 0
je 0x6661f932
mov edi, dword [ebx + 0x10]
mov eax, dword [edi + 4]
cmp byte [eax + 9], 0
je 0x6661f7d8
sub dword [eax + 0xc], 1
jne 0x6661f7d8
call fcn.66582810
mov edi, dword [ebx + 0x10]
xor edx, edx
mov eax, ebx
call fcn.6659f440
mov dword [edi + 0x1c], eax
mov eax, dword [ebx + 0x10]
mov dword [eax], str.main
mov byte [eax + 8], 3
mov dword [eax + 0x10], str.temp
mov byte [eax + 0x18], 1
cmp byte [ebx + 0x53], 0
mov dword [ebx + 0x64], 0xa029a697
jne 0x6661f6b1
mov edx, dword [ebx + 0x110]
mov dword [ebx + 0x40], 0
test edx, edx
je 0x6661f827
xor edx, edx
mov eax, ebx
call fcn.66593f00
mov dword [esp + 8], 2
mov dword [esp + 4], str.MATCH
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_overload_function
cmp eax, 7
je 0x6661faaa
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_errcode
mov edi, eax
test eax, eax
jne 0x6661f879
mov eax, 0x66601900
jmp 0x6661f86d
cmp edi, 4
jg 0x6661f983
mov eax, dword [edi*4 + 0x6668b990]
mov dword [esp], ebx
add edi, 1
call eax
test eax, eax
je 0x6661f85d
mov dword [ebx + 0x40], eax
mov edx, eax
mov eax, ebx
call fcn.66593f00
mov eax, dword [0x6667ce18]
mov ecx, dword [0x6667ce14]
xor edx, edx
mov dword [esp], eax
mov eax, ebx
call fcn.6658c5e0
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x6661fa91
mov dword [esp], eax
call dword [0x6667ce50]
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0xfc], 0x666021b0
mov dword [ebx + 0x100], 0x3e8
test eax, eax
je 0x6661f6c1
mov dword [esp], eax
call dword [0x6667ce58]
jmp 0x6661f6b1
mov eax, ebx
xor edx, edx
xor ebx, ebx
call fcn.665fc050
jmp 0x6661f6df
mov dword [esp + 0x10], 0x6667e21c
mov edi, 0x15
mov dword [esp + 0xc], 0x28db8
mov dword [esp + 8], str.misuse
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0x15
call sym.libsqlite3_0.dll_sqlite3_log
jmp 0x6661f67e
mov dword [esp], ebx
xor ebx, ebx
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x6661f6c1
mov eax, dword [ebx + 0x10]
xor ecx, ecx
mov edx, str.BINARY
mov eax, dword [eax + 0xc]
movzx edi, byte [eax + 0x4d]
mov eax, edi
mov byte [ebx + 0x50], al
mov eax, ebx
call fcn.6659c1f0
test eax, eax
je 0x6661f95f
mov ecx, edi
movzx edi, cl
lea edx, [edi + edi*4]
lea eax, [eax + edx*4 - 0x14]
mov dword [ebx + 8], eax
jmp 0x6661f7be
cmp eax, 0xc0a
mov eax, 7
cmove edx, eax
mov eax, ebx
mov dword [ebx + 0x40], edx
call fcn.66593f00
jmp 0x6661f6b1
test eax, eax
jne 0x6661f879
mov eax, dword [0x666b0070]
test eax, eax
je 0x6661f9ea
xor edi, edi
lea ebp, [esp + 0x3c]
cmp byte [0x6667ce04], 0
je 0x6661f9ff
mov dword [esp], 2
call dword [0x6667ce48]
test eax, eax
je 0x6661f9ff
mov dword [esp], eax
mov dword [esp + 0x28], eax
call dword [0x6667ce50]
cmp dword [0x666b0070], edi
mov eax, dword [esp + 0x28]
ja 0x6661fa48
mov dword [esp], eax
call dword [0x6667ce58]
mov dword [esp], 0
mov dword [esp + 0x3c], 0
call sym.libsqlite3_0.dll_sqlite3_free
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_errcode
test eax, eax
je 0x6661f885
jmp 0x6661f6b1
cmp dword [0x666b0070], edi
jbe 0x6661f9d6
mov eax, dword [0x666b0074]
mov edx, dword [eax + edi*4]
mov dword [esp + 0x3c], 0
test edx, edx
je 0x6661fab7
mov dword [esp + 8], 0
mov dword [esp + 4], ebp
mov dword [esp], ebx
call edx
test eax, eax
jne 0x6661fa64
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
add edi, 1
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x6661f99a
mov edx, dword [0x666b0074]
mov edx, dword [edx + edi*4]
mov dword [esp], eax
mov dword [esp + 0x28], edx
call dword [0x6667ce58]
mov edx, dword [esp + 0x28]
jmp 0x6661fa0f
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], eax
mov dword [esp + 8], str.automatic_extension_loading_failed:__s
mov dword [esp + 0xc], edx
mov dword [esp], ebx
call fcn.665b31b0
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x6661f9ea
mov dword [ebx + 0xfc], 0x666021b0
mov dword [ebx + 0x100], 0x3e8
jmp 0x6661f6c1
mov dword [esp], ebx
call fcn.6658a200
jmp 0x6661f848
xor eax, eax
jmp 0x6661fa38