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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0xb4]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], esi
mov esi, eax
mov eax, dword [eax]
mov edx, dword [esi + 0xc]
mov edi, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x4c], edx
mov eax, dword [esi + 8]
mov dword [esp + 0x48], edi
mov edi, dword [esi + 4]
movzx edx, byte [edx + 0x10]
mov dword [esp + 0x34], eax
mov ebx, dword [edi + 0xc]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x44], edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], edx
test ebx, ebx
jle 0x665ba79a
lea edx, [edx + edx*8]
mov esi, dword [ecx + edx*8 + 0x34]
xor edx, edx
xor ecx, ecx
lea esi, [esi]
nop
cmp dword [eax + 0x14], esi
jne 0x665ba0eb
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
and edi, dword [eax + 0x20]
and ebp, dword [eax + 0x24]
or ebp, edi
jne 0x665ba0eb
movzx edi, word [eax + 0xc]
and edi, 0xf7ff
je 0x665ba0eb
movzx edi, word [eax + 0xa]
and di, 0x80
cmp di, 1
adc ecx, 0
add edx, 1
add eax, 0x30
cmp edx, ebx
jne 0x665ba0b8
lea eax, [ecx + ecx*4]
mov ebx, ecx
lea edi, [eax*4 + 0x50]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x665ba510
mov ebp, dword [eax]
test ebp, ebp
jle 0x665ba50a
mov esi, dword [esp + 0x38]
mov dword [esp + 0x3c], edi
add eax, 4
xor ecx, ecx
mov dword [esp + 0x40], ebx
mov edi, dword [esp + 0x30]
lea esi, [esi + esi*8]
jmp 0x665ba155
mov ebx, dword [edi + esi*8 + 0x34]
cmp dword [edx + 0x1c], ebx
jne 0x665ba15c
test byte [eax + 8], 2
jne 0x665ba15c
add ecx, 1
add eax, 0x14
cmp ebp, ecx
je 0x665ba784
mov edx, dword [eax]
cmp byte [edx], 0xa6
je 0x665ba138
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
xor esi, esi
xor ebp, ebp
mov eax, dword [esp + 0x48]
mov edx, edi
xor ecx, ecx
mov eax, dword [eax]
test eax, eax
je 0x665ba4d0
call fcn.6658bdd0
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x665ba4e9
mov dword [esp + 8], edi
mov edi, eax
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
lea edx, [edi + 0x50]
lea eax, [ebx + ebx*2]
mov dword [edi + 8], ebp
lea eax, [edx + eax*4]
mov dword [edi + 4], edx
add esi, eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], esi
mov esi, dword [esp + 0x44]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x48]
mov dword [edi + 0x48], esi
mov dword [edi + 0x4c], eax
mov edi, dword [esi + 0xc]
mov dword [esp + 0x60], edx
mov eax, dword [esi + 0x14]
test edi, edi
jle 0x665ba7a6
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x40], 0
mov dword [esp + 0x70], ebp
mov ebp, dword [esp + 0x2c]
lea esi, [esi + esi*8]
mov dword [esp + 0x5c], esi
mov ebx, dword [edx + esi*8 + 0x34]
xor edx, edx
mov word [esp + 0x64], dx
xor edx, edx
lea esi, [esi]
cmp dword [eax + 0x14], ebx
jne 0x665ba2d0
mov ecx, dword [eax + 0x20]
mov esi, dword [esp + 0x28]
and esi, dword [eax + 0x24]
and ecx, ebp
or esi, ecx
jne 0x665ba2d0
movzx esi, word [eax + 0xc]
mov word [esp + 0x2c], si
and esi, 0xf7ff
je 0x665ba2d0
test byte [eax + 0xa], 0x80
jne 0x665ba2d0
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x5c]
test byte [esi + ecx*8 + 0x2c], 8
je 0x665ba263
mov esi, dword [eax]
test byte [esi + 4], 1
je 0x665ba2d0
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x60]
lea esi, [esi + esi*2]
lea esi, [ecx + esi*4]
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x68], esi
mov dword [esi], ecx
movzx ecx, word [esp + 0x2c]
mov dword [esi + 8], edx
and cx, 0x1fff
mov word [esp + 0x38], cx
cmp cx, 1
je 0x665ba777
cmp word [esp + 0x38], 0x40
je 0x665ba4bc
test word [esp + 0x2c], 0x180
je 0x665ba530
cmp word [esp + 0x38], 0x100
mov esi, dword [esp + 0x68]
setne cl
add ecx, 0x47
mov byte [esi + 4], cl
add dword [esp + 0x40], 1
lea esi, [esi]
nop
add edx, 1
add eax, 0x30
cmp edx, edi
jne 0x665ba210
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov ebp, dword [esp + 0x70]
mov dword [eax], esi
test ebp, ebp
je 0x665ba31e
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x34]
lea ebx, [eax + ebp*8]
add edx, 0xc
nop
mov ecx, dword [edx - 8]
add eax, 8
add edx, 0x14
movsx ecx, word [ecx + 0x20]
mov dword [eax - 8], ecx
movzx ecx, byte [edx - 0x14]
and ecx, 1
mov byte [eax - 4], cl
cmp ebx, eax
jne 0x665ba300
mov eax, dword [esp + 0x4c]
xor ebx, ebx
xor esi, esi
mov word [eax + 0x12], bx
mov dword [eax + 0x24], 0x400
mov word [eax + 0x28], si
mov byte [eax + 0x1c], 0
movzx eax, word [eax + 0x2c]
cmp eax, dword [esp + 0x40]
jl 0x665ba3d0
movzx eax, word [esp + 0x64]
lea esi, [esp + 0x8c]
mov edi, dword [esp + 0x58]
mov dword [esp + 8], 0
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x6c], eax
mov ecx, edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov edx, esi
mov dword [esp], 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], 0xffffffff
call fcn.665b9940
mov dword [esp + 0x68], eax
test eax, eax
je 0x665ba408
mov eax, dword [esp + 0x3c]
mov ebx, dword [eax + 0x1c]
test ebx, ebx
jne 0x665ba520
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x3c]
mov eax, dword [eax]
call fcn.665926e0
mov eax, dword [esp + 0x68]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x4c]
mov eax, dword [eax]
call fcn.66592d50
test eax, eax
je 0x665ba347
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x3c]
mov eax, dword [eax]
call fcn.665926e0
mov dword [esp + 0x68], 7
jmp 0x665ba3b9
mov eax, esi
mov esi, dword [esp + 0x4c]
not edi
not eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], eax
and edi, dword [esi + 4]
and eax, dword [esi]
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x60], edi
or edi, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x7c], esi
jne 0x665ba5b7
test esi, esi
je 0x665ba39b
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x6c]
mov dword [esp], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x50]
call fcn.665b9940
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0x34]
mov edx, esi
and edi, dword [esi]
mov esi, dword [esp + 0x38]
and esi, dword [edx + 4]
mov dword [esp + 0x70], edi
xor edx, edx
or edi, esi
mov dword [esp + 0x74], esi
sete dl
mov dword [esp + 0x78], edx
test eax, eax
jne 0x665ba71f
mov dword [esp + 0x7c], edx
jmp 0x665ba5d3
movzx ecx, byte [eax + 0xf]
mov esi, dword [esp + 0x68]
mov byte [esi + 4], cl
jmp 0x665ba2c3
mov eax, edi
mov edx, ecx
call fcn.6658bcf0
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x665ba18f
mov eax, dword [esp + 0x48]
mov dword [esp + 4], 0x6667f387
mov dword [esp], eax
call fcn.665b3dd0
mov dword [esp + 0x68], 7
jmp 0x665ba3b9
je 0x665ba78c
xor esi, esi
xor ebp, ebp
jmp 0x665ba168
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x665ba3aa
movzx ecx, byte [esp + 0x38]
mov esi, dword [esp + 0x68]
mov byte [esi + 4], cl
test byte [esp + 0x2c], 0x3c
je 0x665ba2c3
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x10]
mov esi, ecx
movzx ecx, byte [ecx]
cmp cl, 0xaf
jne 0x665ba55a
movzx ecx, byte [esi + 2]
cmp cl, 0xb0
je 0x665ba851
cmp cl, 0x89
jne 0x665ba2c3
mov ecx, dword [esi + 0x14]
mov ecx, dword [ecx + 0x1c]
mov ecx, dword [ecx]
cmp ecx, 1
jle 0x665ba2c3
mov ecx, dword [esp + 0x40]
cmp ecx, 0xf
jg 0x665ba592
mov esi, 1
shl esi, cl
or word [esp + 0x64], si
cmp word [esp + 0x38], 0x10
je 0x665ba85b
cmp word [esp + 0x38], 4
jne 0x665ba2c3
mov esi, dword [esp + 0x68]
mov byte [esi + 4], 0x20
jmp 0x665ba2c3
mov ecx, dword [esp + 0x7c]
test ecx, ecx
jne 0x665ba442
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov eax, dword [esp + 0x40]
xor esi, esi
xor edi, edi
lea eax, [eax + eax*2]
shl eax, 2
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x78], eax
lea esi, [esi]
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x28], esi
mov ebx, edi
test ebp, ebp
je 0x665ba7f0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x30], ebx
mov esi, 0xffffffff
mov edi, 0xffffffff
mov ebp, dword [eax + 0x14]
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 4]
lea edx, [eax + 8]
mov eax, dword [esp + 0x64]
add eax, edx
mov dword [esp + 0x2c], eax
lea esi, [esi]
nop
mov eax, dword [edx]
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*2]
shl eax, 4
add eax, ebp
and ebx, dword [eax + 0x24]
and ecx, dword [eax + 0x20]
mov eax, ebx
mov ebx, dword [esp + 0x30]
cmp dword [esp + 0x28], ecx
sbb ebx, eax
jae 0x665ba662
cmp ecx, esi
mov ebx, eax
sbb ebx, edi
cmovb esi, ecx
cmovb edi, eax
add edx, 0xc
cmp dword [esp + 0x2c], edx
jne 0x665ba630
mov eax, edi
and eax, esi
cmp eax, 0xffffffff
je 0x665ba7f0
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
xor edx, esi
xor eax, edi
or edx, eax
je 0x665ba5f0
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x74]
xor edx, esi
xor eax, edi
or edx, eax
je 0x665ba5f0
lea eax, [esp + 0x8c]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x58]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x6c]
mov edx, ebx
mov ecx, ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
or edx, esi
mov dword [esp], edx
mov edx, ebx
mov dword [esp + 0xc], eax
mov eax, ebp
or eax, edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x50]
call fcn.665b9940
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
xor edx, ebx
xor ecx, ebp
or ecx, edx
jne 0x665ba717
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x7c], 1
test edx, edx
mov edx, 1
cmovne edx, dword [esp + 0x78]
mov dword [esp + 0x78], edx
test eax, eax
je 0x665ba5f0
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x78]
or eax, dword [esp + 0x68]
jne 0x665ba39b
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x54]
mov dword [esp + 8], 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x6c]
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov ecx, eax
mov eax, dword [esp + 0x50]
call fcn.665b9940
mov dword [esp + 0x68], eax
jmp 0x665ba39b
mov esi, dword [esp + 0x68]
mov byte [esi + 4], 2
jmp 0x665ba2c3
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
lea esi, [ebp*8]
add edi, esi
jmp 0x665ba168
xor ebx, ebx
mov edi, 0x50
jmp 0x665ba101
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], 0
mov dword [eax], 0
xor eax, eax
mov word [esp + 0x64], ax
test ebp, ebp
jne 0x665ba2f0
mov eax, dword [esp + 0x4c]
xor edx, edx
xor ecx, ecx
mov word [eax + 0x12], dx
mov dword [eax + 0x24], 0x400
mov word [eax + 0x28], cx
mov byte [eax + 0x1c], 0
jmp 0x665ba347
mov edi, dword [esp + 0x7c]
test edi, edi
jne 0x665ba723
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x54]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x6c]
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov ecx, eax
mov eax, dword [esp + 0x50]
call fcn.665b9940
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x68], eax
test esi, esi
je 0x665ba39b
jmp 0x665ba723
mov ecx, dword [esi + 0x14]
mov ecx, dword [ecx]
jmp 0x665ba574
mov esi, dword [esp + 0x68]
mov byte [esi + 4], 8
jmp 0x665ba2c3