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

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x2cc
mov dword [esp + 0x5c], eax
mov dword [esp + 0x40], edx
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x44], ecx
mov ecx, 0xe
mov esi, eax
mov dword [esp + 0x58], eax
mov eax, dword [eax + 0xc]
lea eax, [eax + eax*2]
shl eax, 4
add eax, dword [esi + 0x14]
mov ebx, eax
mov dword [esp + 0x54], eax
mov eax, dword [edi + 0xc]
lea edi, [esp + 0x80]
mov ebp, eax
mov dword [esp + 0x50], eax
xor eax, eax
rep stosd dword es:[edi], eax
movzx eax, byte [ebp + 0x10]
mov edx, dword [edx + 4]
lea eax, [eax + eax*8]
lea eax, [edx + eax*8 + 8]
mov dword [esp + 0x48], eax
mov eax, dword [eax + 0x2c]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x14]
cmp ebx, eax
mov dword [esp + 0x34], eax
jbe 0x665b5616
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esp + 0x34]
test byte [eax + 0x13], 1
je 0x665b5603
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x50]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0x198]
mov ecx, dword [eax + 0x19c]
and edx, dword [edi + 8]
and ecx, dword [edi + 0xc]
or ecx, edx
je 0x665b5603
mov esi, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x74], 0
lea eax, [eax + eax*2]
mov dword [esp + 0x28], esi
shl eax, 4
add eax, esi
mov edi, eax
mov dword [esp + 0x38], eax
mov eax, dword [ecx]
cmp esi, edi
mov dword [esp + 0x6c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x70], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x78], eax
lea eax, [esp + 0xb8]
mov dword [esp + 0x7c], eax
jae 0x665b562d
mov dword [esp + 0x3c], 1
mov dword [esp + 0x30], 0
jmp 0x665b5389
mov eax, dword [eax + 0xc]
mov dword [esp + 0x70], eax
xor eax, eax
lea ebx, [esp + 0x6c]
mov edx, dword [esp + 0x40]
mov word [esp + 0xb8], ax
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
mov eax, dword [eax + 0x10]
test byte [eax + 0x2a], 0x10
mov eax, ebx
je 0x665b53f0
call sym._whereLoopAddVirtual
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x665b5405
movzx ebx, word [esp + 0xb8]
test bx, bx
je 0x665b5429
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x665b5500
lea eax, [esp + 0x88]
lea edx, [esp + 0xc0]
mov word [esp + 0x80], bx
shl ebx, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
mov dword [esp + 0x3c], 0
add dword [esp + 0x28], 0x30
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x38], eax
jbe 0x665b5433
mov eax, dword [esp + 0x28]
test byte [eax + 0x13], 2
jne 0x665b52e3
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x4c]
cmp edi, dword [eax + 8]
jne 0x665b5376
mov esi, dword [esp + 0x58]
mov eax, dword [esi]
mov dword [esp + 0x12c], esi
mov byte [esp + 0x130], 0x48
mov dword [esp + 0x134], 1
mov dword [esp + 0x128], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x13c], eax
lea eax, [esp + 0x128]
mov dword [esp + 0x70], eax
jmp 0x665b52ea
call sym._whereLoopAddBtree
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x665b5328
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov eax, ebx
call sym._whereLoopAddOr
movzx ebx, word [esp + 0xb8]
mov dword [esp + 0x30], eax
test bx, bx
jne 0x665b5339
xor eax, eax
mov word [esp + 0x80], ax
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x34]
mov ebx, 1
mov ebp, dword [esp + 0x30]
mov eax, dword [esi + 0x30]
mov word [esi + 0x28], bx
mov dword [eax], edi
xor edi, edi
test ebp, ebp
mov dword [esi + 0x24], 0x2000
mov word [esi + 0x12], di
mov byte [esi + 0x11], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
jne 0x665b54e9
cmp word [esp + 0x80], 0
je 0x665b5603
lea ebx, [esp + 0x80]
xor esi, esi
mov edi, dword [esp + 0x50]
mov ebp, dword [esp + 0x5c]
jmp 0x665b54b3
movzx eax, word [esp + 0x80]
add ebx, 0x10
cmp eax, esi
jle 0x665b5603
movzx eax, word [ebx + 0x10]
mov edx, dword [ebx + 0xc]
mov ecx, edi
add esi, 1
add eax, 1
mov word [edi + 0x14], ax
movzx eax, word [ebx + 0x12]
mov word [edi + 0x16], ax
mov eax, dword [ebx + 8]
mov dword [edi + 4], edx
mov edx, dword [ebp + 0x10]
mov dword [edi], eax
mov eax, dword [ebp]
call sym._whereLoopInsert.isra.308
test eax, eax
je 0x665b54a0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
add esp, 0x2cc
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, word [esp + 0x80]
mov word [esp + 0xf0], ax
mov edi, eax
mov dword [esp + 0x2c], eax
mov edx, eax
lea eax, [esp + 0x88]
shl edx, 4
mov dword [esp + 4], eax
lea eax, [esp + 0xf8]
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._memcpy
xor eax, eax
test edi, edi
mov word [esp + 0x80], ax
je 0x665b5376
lea ebp, [esp + 0xf0]
mov dword [esp + 0x20], 0
lea esi, [esi]
test bx, bx
je 0x665b55e0
movsx eax, word [ebp + 0x12]
mov edi, dword [ebp + 0xc]
lea ebx, [esp + 0xb8]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], edi
xor edi, edi
mov dword [esp + 0x14], eax
movsx eax, word [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
mov ebp, eax
movsx edx, word [ebx + 0x12]
mov eax, dword [esp + 0x14]
add edi, 1
add ebx, 0x10
call sym._sqlite3LogEstAdd
movsx edx, word [ebx]
movsx esi, ax
mov eax, dword [esp + 0x18]
call sym._sqlite3LogEstAdd
mov edx, dword [ebx - 8]
mov ecx, dword [esp + 0x1c]
cwde
or ecx, dword [ebx - 4]
mov dword [esp], eax
lea eax, [esp + 0x80]
mov dword [esp + 4], esi
or edx, ebp
call sym._whereOrInsert
movzx eax, word [esp + 0xb8]
cmp eax, edi
jg 0x665b558e
mov ebp, dword [esp + 0x24]
add dword [esp + 0x20], 1
add ebp, 0x10
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x2c]
je 0x665b5376
movzx ebx, word [esp + 0xb8]
jmp 0x665b5560
add dword [esp + 0x34], 0x30
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x54], eax
ja 0x665b5250
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x30]
add esp, 0x2cc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x50]
mov esi, dword [esp + 0x34]
mov edx, 1
xor ecx, ecx
mov eax, dword [edi + 0x30]
mov word [edi + 0x28], dx
mov dword [eax], esi
mov dword [edi + 0x24], 0x2000
mov word [edi + 0x12], cx
mov byte [edi + 0x11], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
jmp 0x665b5477