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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x6c
mov edi, dword [eax + 8]
mov eax, dword [edi + 4]
mov dword [esp + 0x24], eax
mov eax, edx
and eax, 2
cmp byte [ebx], 3
mov byte [esp + 0x2c], al
je 0x665e5e20
mov esi, dword [ebx + 0x74]
movzx eax, byte [ebx + 0x44]
movzx ebp, word [ebx + 0x46]
mov byte [esp + 0x2d], al
mov eax, dword [esi + 0x40]
mov word [esp + 0x2e], bp
movzx eax, word [eax + ebp*2]
rol ax, 8
and ax, word [esi + 0x1a]
movzx eax, ax
add eax, dword [esi + 0x38]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x14]
test eax, eax
js 0x665e5e00
cmp byte [esp + 0x2c], 0
movzx eax, byte [esi + 8]
je 0x665e5be9
test al, al
je 0x665e5bc0
mov eax, dword [esp + 0x28]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.665828f0
mov edx, 0xaaaaaaab
movzx ecx, ax
mov eax, dword [esp + 0x24]
add ecx, dword [esi + 0x14]
add ecx, 1
mov eax, dword [eax + 0x28]
mov dword [esp + 0x30], eax
add eax, eax
mul edx
shr edx, 1
cmp ecx, edx
jge 0x665e5bc0
cmp word [esi + 0x18], 1
je 0x665e5bc0
mov dword [esp + 0x30], 1
movzx edx, byte [ebx + 1]
lea esi, [esi]
and edx, 0x20
jne 0x665e5dd0
mov ecx, dword [ebx + 0x70]
test ecx, ecx
je 0x665e5e40
mov eax, dword [esi + 0x48]
call fcn.665dd740
mov dword [esp + 0x44], eax
test eax, eax
je 0x665e5c40
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [ebx + 0x45], 0
mov eax, ebx
je 0x665e5ea8
call fcn.66587740
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x24]
mov dword [esp + 0x44], 0
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
movzx eax, byte [esi + 8]
mov dword [esp + 0x30], 0
movzx edx, byte [ebx + 1]
test al, al
jne 0x665e5b90
and edx, 0xfffffff1
xor eax, eax
cmp byte [ebx], 0
mov byte [ebx + 1], dl
mov word [ebx + 0x32], ax
jne 0x665e5ec8
movzx eax, word [ebx + 0x46]
test ax, ax
je 0x665e5ec8
mov ecx, dword [ebx + 0x74]
cmp byte [ecx + 8], 0
je 0x665e5ec8
sub eax, 1
mov dword [esp + 0x44], 0
mov word [ebx + 0x46], ax
jmp 0x665e5b90
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x48]
mov eax, esi
call fcn.665e1670
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
lea eax, [esp + 0x44]
movzx ecx, word [esp + 0x5a]
mov edx, ebp
mov dword [esp], eax
mov eax, esi
call fcn.665b1c10
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x665e5bb8
cmp byte [esi + 8], 0
jne 0x665e5d74
mov edi, dword [ebx + 0x74]
mov edx, dword [edi + 0x14]
test edx, edx
js 0x665e5ff0
movsx eax, byte [ebx + 0x44]
movsx edx, byte [esp + 0x2d]
sub eax, 1
cmp eax, edx
jle 0x665e5f10
mov eax, dword [ebx + edx*4 + 0x7c]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], eax
movzx ecx, word [edi + 0x18]
mov edx, dword [edi + 0x40]
mov eax, dword [edi + 0x38]
movzx ecx, word [edx + ecx*2 - 2]
rol cx, 8
and cx, word [edi + 0x1a]
movzx ecx, cx
add ecx, eax
add eax, 4
cmp ecx, eax
jb 0x665e6020
mov dword [esp + 4], ecx
mov dword [esp + 0x28], ecx
mov dword [esp], edi
call dword [edi + 0x4c]
mov word [esp + 0x38], ax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x54]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x48]
call fcn.665dd740
mov ecx, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x44], eax
jne 0x665e5bb8
lea edx, [esp + 0x44]
movzx eax, word [esp + 0x38]
sub ecx, 4
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x24], eax
add eax, 4
mov dword [esp + 4], edx
mov edx, ebp
mov dword [esp], eax
mov eax, esi
call fcn.665e1860
movzx edx, word [edi + 0x18]
mov eax, dword [esp + 0x44]
sub edx, 1
test eax, eax
jne 0x665e5bb8
lea ebp, [esp + 0x44]
mov ecx, dword [esp + 0x24]
mov eax, edi
mov dword [esp], ebp
call fcn.665b1c10
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x665e5bb8
mov eax, ebx
call fcn.665e3530
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
movzx eax, byte [esp + 0x2d]
cmp al, byte [ebx + 0x44]
jl 0x665e5f20
mov eax, dword [esp + 0x30]
test eax, eax
je 0x665e5f88
mov byte [ebx], 2
movzx eax, word [esi + 0x18]
cmp word [esp + 0x2e], ax
jb 0x665e6010
sub eax, 1
mov dword [ebx + 4], 0xffffffff
mov word [ebx + 0x46], ax
mov eax, dword [esp + 0x44]
jmp 0x665e5bb8
mov eax, dword [esp + 0x24]
mov edx, dword [ebx + 0x40]
mov ecx, ebx
mov eax, dword [eax + 8]
call fcn.665e4430
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
mov ecx, dword [ebx + 0x70]
test ecx, ecx
jne 0x665e5ba4
jmp 0x665e5e40
mov eax, esi
call fcn.665b1600
mov edx, eax
mov eax, 0xb
test edx, edx
je 0x665e5b2d
jmp 0x665e5bb8
mov eax, ebx
call fcn.665e5650
mov dword [esp + 0x44], eax
test eax, eax
je 0x665e5af5
jmp 0x665e5bb8
cmp byte [edi + 0xb], 0
je 0x665e5ba4
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x40]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x24]
mov byte [edi + 0xb], 0
mov dword [esp + 0x38], eax
mov eax, dword [edi + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x665e5ba4
mov dword [esp + 0x3c], ebp
jmp 0x665e5e7f
mov eax, dword [eax + 0x18]
test eax, eax
je 0x665e5ef0
test byte [eax + 1], 0x10
je 0x665e5e78
mov byte [edi + 0xb], 1
cmp edx, dword [eax + 0x40]
jne 0x665e5e78
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
xor ecx, dword [eax + 0x20]
xor ebp, dword [eax + 0x24]
or ebp, ecx
jne 0x665e5e78
mov byte [eax], 1
jmp 0x665e5e78
call fcn.665e4260
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
movzx eax, byte [esi + 8]
jmp 0x665e5be9
mov eax, ebx
call fcn.665e5910
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
mov dword [esp + 0x30], 0
movzx edx, byte [ebx + 1]
jmp 0x665e5b90
mov eax, dword [esi + 0x48]
mov ebp, dword [esp + 0x3c]
call fcn.665dd740
mov dword [esp + 0x44], eax
test eax, eax
jne 0x665e5bb8
jmp 0x665e5c40
mov eax, dword [ebx + 0x74]
mov eax, dword [eax + 4]
mov dword [esp + 0x34], eax
jmp 0x665e5cb3
mov eax, dword [ebx + 0x74]
mov edi, ebx
mov eax, dword [eax + 0x48]
call fcn.6658dc20
movzx eax, byte [ebx + 0x44]
sub eax, 1
mov byte [ebx + 0x44], al
movzx ebx, byte [esp + 0x2d]
jmp 0x665e5f59
lea ecx, [eax - 1]
sub eax, 1
mov byte [edi + 0x44], cl
test edx, edx
je 0x665e5f5c
mov eax, dword [edx + 0x48]
call fcn.6658dc20
movzx eax, byte [edi + 0x44]
movsx eax, al
mov edx, dword [edi + eax*4 + 0x78]
cmp bl, al
jl 0x665e5f40
mov dword [edi + 0x74], edx
mov eax, edi
mov ebx, edi
call fcn.665e3530
mov dword [esp + 0x44], eax
test eax, eax
je 0x665e5d95
jmp 0x665e5bb8
mov eax, ebx
call fcn.665b1280
cmp byte [esp + 0x2c], 0
mov dword [esp + 0x44], eax
je 0x665e5fdd
cmp byte [ebx + 0x44], 0
js 0x665e5fda
mov esi, 0
je 0x665e5fc7
lea esi, [esi]
nop
mov eax, dword [ebx + esi*4 + 0x78]
add esi, 1
mov eax, dword [eax + 0x48]
call fcn.6658dc20
movsx eax, byte [ebx + 0x44]
cmp esi, eax
jl 0x665e5fb0
mov eax, dword [ebx + 0x74]
mov eax, dword [eax + 0x48]
call fcn.6658dc20
mov byte [ebx + 0x44], 0xff
mov eax, dword [esp + 0x44]
mov byte [ebx], 3
cmp eax, 0x10
mov edx, 0
cmove eax, edx
jmp 0x665e5bb8
mov eax, edi
call fcn.665b1600
mov dword [esp + 0x44], eax
test eax, eax
je 0x665e5c94
jmp 0x665e5bb8
mov dword [ebx + 4], 1
mov eax, dword [esp + 0x44]
jmp 0x665e5bb8
mov dword [esp + 0x10], 0x6667e21c
mov dword [esp + 0xc], 0x121aa
mov dword [esp + 8], str.database_corruption
mov dword [esp + 4], str._s_at_line__d_of___.10s_
mov dword [esp], 0xb
call sym.libsqlite3_0.dll_sqlite3_log
mov eax, 0xb
jmp 0x665e5bb8