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

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x9c
mov ebx, dword [eax]
mov eax, dword [eax + 0x98]
mov dword [esp + 0x34], edx
lea ecx, [esp + 0x80]
mov dword [esp + 0x78], eax
mov eax, dword [edi + 0x40]
mov dword [esp + 0x70], 0
mov edx, dword [eax]
mov dword [esp + 0x74], 1
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
mov ebp, eax
test eax, eax
je 0x665de113
movzx eax, byte [edi + 0xc]
mov byte [edi + 0x12], al
mov eax, edi
call fcn.6658ef00
add esp, 0x9c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi]
mov esi, dword [edi + 0xd0]
mov ecx, dword [eax + 8]
mov eax, dword [edi + 0x40]
mov edx, esi
add ecx, 1
call fcn.6659bc20
mov ebp, eax
test eax, eax
jne 0x665de0f8
cmp byte [esi], 0
jne 0x665de377
mov eax, dword [esp + 0x74]
mov dword [esp + 0x48], eax
test eax, eax
je 0x665de409
mov esi, dword [esp + 0x34]
mov dword [edi + 0x48], 0
lea ecx, [edi + 0x48]
mov dword [edi + 0x4c], 0
mov edx, dword [esp + 0x84]
mov eax, esi
mov dword [esp + 0x48], esi
mov esi, ecx
and eax, 1
mov byte [esp + 0x4c], al
mov eax, dword [esp + 0x80]
lea esi, [esi]
lea ecx, [esp + 0x70]
mov dword [esp], eax
mov eax, edi
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x6c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], ecx
call fcn.6659ea00
test eax, eax
jne 0x665de3b0
mov ecx, dword [edi + 0x94]
mov eax, dword [esp + 0x6c]
xor ebx, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ecx
cmp eax, 0xffffffff
jne 0x665de1f9
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
sub eax, ecx
mov ecx, dword [edi + 0x98]
sbb edx, ebx
mov dword [esp], eax
lea ebx, [ecx + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
sar ebx, 0x1f
mov dword [esp + 0xc], ebx
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 0x6c], eax
mov ecx, dword [edi + 0x48]
mov ebx, dword [edi + 0x4c]
or eax, dword [esp + 0x34]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebx
je 0x665de2e7
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
xor eax, ecx
mov edx, ebx
or edx, eax
je 0x665de31d
mov ecx, dword [esp + 0x6c]
test ecx, ecx
je 0x665de2d4
mov edx, dword [esp + 0x48]
test edx, edx
je 0x665de26b
mov eax, dword [edi + 0x58]
add dword [edi + 0x64], 1
test eax, eax
je 0x665de25e
lea esi, [esi]
nop
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x665de250
mov eax, dword [edi + 0xd4]
xor edx, edx
call fcn.6658ec50
xor ebx, ebx
jmp 0x665de27c
add ebp, 1
add ebx, 1
cmp dword [esp + 0x6c], ebx
jbe 0x665de2d0
mov dword [esp + 4], 0
xor ecx, ecx
mov edx, esi
mov eax, edi
mov dword [esp], 1
call fcn.665ddc80
test eax, eax
je 0x665de270
mov dword [esp + 0x48], eax
cmp eax, 0x65
jne 0x665de71d
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
mov dword [esp + 0x48], 0
mov dword [edi + 0x48], eax
mov dword [edi + 0x4c], edx
jmp 0x665de180
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
jmp 0x665de180
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add eax, dword [edi + 0x50]
adc edx, dword [edi + 0x54]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x40], eax
xor eax, ecx
xor edx, ebx
or edx, eax
je 0x665de33c
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
xor eax, ecx
mov edx, ebx
or edx, eax
jne 0x665de2d4
mov edx, dword [esp + 0x70]
mov eax, edi
call fcn.66586360
test eax, eax
jne 0x665de75b
mov eax, dword [esp + 0x70]
mov dword [edi + 0x18], eax
jmp 0x665de229
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
sub eax, ecx
mov ecx, dword [edi + 0x98]
sbb edx, ebx
mov dword [esp], eax
lea ebx, [ecx + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
sar ebx, 0x1f
mov dword [esp + 0xc], ebx
call sub.libgcc_s_dw2_1.dll___divdi3
mov dword [esp + 0x6c], eax
jmp 0x665de211
lea eax, [esp + 0x74]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [ebx + 0x20]
test eax, eax
je 0x665de13a
movzx edx, byte [edi + 0xc]
mov ebp, eax
mov byte [edi + 0x12], dl
jmp 0x665de0ff
test ebp, ebp
setne dl
and dl, byte [esp + 0x4c]
mov byte [esp + 0x28], dl
cmp eax, 0x65
je 0x665de73c
movzx edx, byte [edi + 0xc]
mov dword [esp + 0x48], ebp
mov ebp, eax
mov byte [edi + 0x12], dl
cmp byte [esp + 0x28], 0
je 0x665de0ff
mov eax, dword [edi + 0xac]
mov dword [esp + 4], str.recovered__d_pages_from__s
mov dword [esp], 0x21b
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 8], eax
call sym.libsqlite3_0.dll_sqlite3_log
jmp 0x665de0ff
mov byte [esp + 0x28], 0
mov ecx, 0xffffffff
lea edx, [esp + 0x78]
mov eax, edi
call fcn.6659b2e0
mov ebp, eax
movzx eax, byte [edi + 0xc]
mov byte [edi + 0x12], al
test ebp, ebp
jne 0x665de3d3
mov eax, dword [edi]
mov ebx, dword [edi + 0xd0]
mov ecx, dword [eax + 8]
lea esi, [ebx + 4]
mov eax, dword [edi + 0x40]
mov edx, esi
add ecx, 1
call fcn.6659bc20
mov ebp, eax
test eax, eax
jne 0x665de3d3
movzx eax, byte [edi + 0x10]
sub eax, 1
cmp al, 2
ja 0x665de705
xor edx, edx
cmp byte [ebx + 4], 0
mov eax, edi
setne dl
xor ecx, ecx
call fcn.6659df90
mov ebp, eax
test eax, eax
jne 0x665de3d3
cmp byte [ebx + 4], 0
je 0x665de3d3
mov ebp, dword [esp + 0x74]
test ebp, ebp
je 0x665de3d3
mov dword [ebx], 0
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov dword [esp + 0x34], eax
lea ebp, [edx + edx]
mov dword [esp + 0x38], edx
mov eax, ebp
cdq
call fcn.6658bcf0
mov ebx, eax
test eax, eax
je 0x665de745
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x34]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x4001
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [eax + 0x18]
mov dword [esp + 0x4c], 0
mov ebp, eax
test eax, eax
jne 0x665de6da
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x88]
mov ebp, dword [eax + 4]
mov eax, dword [ebx]
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [esp + 0x38], ebp
call dword [eax + 0x18]
mov ebp, eax
test eax, eax
jne 0x665de6da
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 8]
mov dword [esp + 0x40], edx
add edx, 1
mov eax, edx
mov dword [esp + 0x58], edx
cdq
add eax, dword [esp + 0x88]
adc edx, dword [esp + 0x8c]
add eax, 6
adc edx, 0
call fcn.6658bcf0
mov dword [esp + 0x4c], eax
test eax, eax
je 0x665de7a4
mov dword [eax], 0
lea ebp, [eax + 4]
mov edx, dword [esp + 0x88]
mov eax, dword [ebx]
mov dword [esp + 0x50], ebp
mov dword [esp + 4], ebp
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], edx
mov dword [esp + 0x40], edx
mov dword [esp], ebx
call dword [eax + 8]
mov ebp, eax
test eax, eax
jne 0x665de6da
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x4c]
mov edx, ebp
mov byte [ecx + eax + 4], 0
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x88]
mov byte [ecx + eax + 1], 0
cmp ebp, dword [esp + 0x88]
sbb edx, dword [esp + 0x8c]
jge 0x665de775
mov edx, dword [esp + 0x40]
mov ebp, dword [esp + 0x38]
mov dword [esp + 0x40], edi
mov dword [esp + 0x38], ebx
mov edi, dword [esp + 0x34]
lea edx, [ecx + edx + 2]
add ebp, ebx
mov ebx, ecx
mov dword [esp + 0x54], edx
jmp 0x665de6ac
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x665de67c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x4001
mov dword [esp + 8], ebp
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [edi + 0x18]
mov edx, eax
test eax, eax
jne 0x665de6d0
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov eax, ebp
call fcn.6659bc20
mov edx, eax
mov eax, dword [ebp]
test eax, eax
je 0x665de65d
mov dword [esp + 0x5c], edx
mov dword [esp], ebp
call dword [eax + 4]
mov dword [ebp], 0
mov edx, dword [esp + 0x5c]
test edx, edx
jne 0x665de6d0
mov eax, dword [esp + 0x54]
cmp byte [eax], 0
je 0x665de67c
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
mov edx, eax
test eax, eax
je 0x665de6d0
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
and eax, 0x3fffffff
lea ebx, [ebx + eax + 1]
mov ecx, ebx
sub ecx, dword [esp + 0x50]
mov eax, ecx
cdq
cmp ecx, dword [esp + 0x88]
mov eax, edx
sbb eax, dword [esp + 0x8c]
jge 0x665de76d
lea eax, [esp + 0x7c]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [edi + 0x20]
mov edx, eax
test eax, eax
je 0x665de600
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x40]
mov ebp, edx
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [ebx]
test eax, eax
je 0x665de6f8
mov dword [esp], ebx
call dword [eax + 4]
mov dword [ebx], 0
mov dword [esp], ebx
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x665de3d3
xor edx, edx
mov eax, edi
call fcn.66591fa0
mov ebp, eax
test eax, eax
jne 0x665de3d3
jmp 0x665de45b
test ebp, ebp
mov esi, dword [esp + 0x48]
setne al
and al, byte [esp + 0x4c]
mov byte [esp + 0x28], al
mov eax, esi
cmp esi, 0x20a
jne 0x665de3c6
mov dword [esp + 0x48], ebp
jmp 0x665de40e
mov dword [esp], 0
mov ebp, 7
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x665de3d3
test ebp, ebp
setne dl
and dl, byte [esp + 0x4c]
mov byte [esp + 0x28], dl
jmp 0x665de3c6
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x40]
mov eax, dword [ebx]
test eax, eax
je 0x665de787
mov dword [esp], ebx
call dword [eax + 4]
mov dword [ebx], 0
mov eax, dword [esp + 0x34]
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [eax + 0x1c]
mov ebp, eax
jmp 0x665de6da
mov ebp, 7
jmp 0x665de6da