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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ecx, dword [edx]
mov dword [edx + 4], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], edx
mov eax, ecx
mov dword [edx + 8], 0
cmp ecx, 4
je 0x66661340
cmp ecx, 9
je 0x66661340
mov eax, dword [esp + 0x20]
mov edi, dword [eax + 0xc]
test edi, edi
je 0x666612a8
mov ebx, dword [eax + 0x1c]
mov ebp, dword [eax + 0x20]
test ebx, ebx
jle 0x666614f0
xor edi, edi
mov eax, ebp
xor ebx, ebx
mov ebp, edi
mov edi, eax
mov eax, dword [esp + 0x10]
mov edx, edi
add ebx, 1
call fcn.66661220
mov esi, eax
mov eax, dword [edi + 4]
mov edi, dword [esp + 0x20]
mov edx, dword [edi + 0x1c]
add eax, ebp
mov ebp, eax
cmp edx, ebx
jle 0x666612c0
test esi, esi
jne 0x666612c0
mov edi, dword [edi + ebx*4 + 0x20]
jmp 0x66661276
mov eax, dword [esp + 0x20]
mov dword [eax + 4], 1
xor esi, esi
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x20]
mov ebx, dword [ecx + 0x20]
mov edi, dword [ebx + 0x10]
mov ebp, dword [ebx + 0x14]
mov dword [ecx + 0x10], edi
mov edi, ecx
mov dword [ecx + 0x14], ebp
mov ecx, dword [ecx]
cmp ecx, 1
je 0x666614d0
cmp ecx, 2
jne 0x666614a0
test eax, eax
jle 0x666612f8
mov eax, edi
call fcn.6658fdb0
lea esi, [esi]
test esi, esi
jne 0x666612b5
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 4]
test esi, esi
jne 0x666612b3
mov ecx, dword [eax]
mov eax, ecx
cmp eax, 4
je 0x66661528
jg 0x666614b0
cmp eax, 1
je 0x66661588
cmp eax, 2
jne 0x66661570
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6658fff0
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx + 0x18]
mov edx, dword [ecx + 8]
mov dword [esp + 0x1c], ecx
test edx, edx
jle 0x6666147c
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov ecx, dword [eax + ecx*4 + 0xc]
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x2c], ecx
test eax, eax
je 0x666612a8
lea esi, [ecx + 0x14]
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], esi
jle 0x66661460
mov ebx, dword [esp + 0x18]
xor ebp, ebp
lea esi, [esi]
mov eax, dword [ebx + 8]
test eax, eax
je 0x666613c4
mov esi, dword [eax + 0x18]
call fcn.66593730
mov eax, dword [esi + 0x28]
test eax, eax
je 0x666613bd
mov dword [esi + 0x28], 0
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_blob_close
mov dword [ebx + 8], 0
lea eax, [ebx + 8]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
setne al
movzx eax, al
mov edi, eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x666613ef
or edi, 2
mov esi, dword [ebx + 4]
mov dword [esp + 0x14], edx
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edx, dword [esp + 0x14]
mov dword [esp], edi
mov ecx, eax
lea eax, [ebx + 8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 4], edx
mov edx, esi
mov eax, dword [eax]
call fcn.666604f0
test eax, eax
jne 0x66661490
mov eax, dword [ebx + 8]
mov ebx, dword [ebx + 0xc]
cmp byte [eax + 0x10], 0
mov eax, 1
cmove ebp, eax
test ebx, ebx
jne 0x66661398
test ebp, ebp
je 0x666612a8
mov esi, dword [esp + 0x2c]
add dword [esp + 0x24], 1
add dword [esp + 0x18], 0x10
mov eax, dword [esp + 0x24]
cmp eax, dword [esi + 0x10]
jl 0x6666138e
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x28], 1
mov eax, dword [esp + 0x28]
cmp eax, dword [ecx + 8]
jl 0x6666135e
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], 0
jmp 0x6666130b
add esp, 0x3c
mov esi, eax
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], eax
jmp 0x666612f8
cmp eax, 9
jne 0x66661570
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6665e490
cmp edx, eax
jne 0x666612f8
mov eax, dword [esp + 0x20]
call fcn.6658fdb0
jmp 0x666612f8
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov esi, dword [esp + 0x20]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
cmp ecx, 1
je 0x6666159c
cmp ecx, 2
je 0x66661309
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], eax
jmp 0x666612fc
mov eax, dword [esp + 0x10]
mov ebx, dword [eax + 4]
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x18]
mov ebx, dword [ebx + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [edx + 0x1c]
mov ecx, dword [eax + 0xc]
mov dword [edx + 8], ecx
test ebx, ebx
jne 0x6666154f
mov ebx, dword [eax + 8]
mov dword [edx + 4], ebx
mov edx, dword [eax + 4]
mov esi, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [esi + 0x14], edx
mov dword [esi + 0x10], eax
xor eax, eax
test ecx, ecx
sete al
mov dword [esi + 8], eax
xor esi, esi
jmp 0x666612b5
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6658e090
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
xor esi, esi
call fcn.6658deb0
jmp 0x666612b5
test ebx, ebx
jne 0x66661309
mov eax, dword [esp + 0x20]
call fcn.6658fdb0
jmp 0x666612fc