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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x49]
cmp ecx, 1
jne 0x10085e50
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
and eax, 2
je 0x10085e50
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx + 0x78]
movzx edx, byte [ecx + 2]
test edx, edx
je 0x10085e50
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x18]
cmp edx, dword [ebp + 0x10]
jne 0x10085e16
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x1c]
cmp ecx, dword [ebp + 0x14]
jne 0x10085e16
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0
xor eax, eax
jmp 0x10086398
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x48]
and ecx, 8
je 0x10085e50
mov edx, dword [ebp + 8]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x1c]
cmp ecx, dword [ebp + 0x14]
jg 0x10085e50
jl 0x10085e40
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x18]
cmp eax, dword [ebp + 0x10]
jae 0x10085e50
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0xffffffff
xor eax, eax
jmp 0x10086398
cmp dword [ebp + 0xc], 0
je 0x10085e6e
mov edx, dword [ebp + 0xc]
push edx
call fcn.100948d0
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov byte [eax + 7], 0
jmp 0x10085e75
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.10085940
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x10085e92
mov eax, dword [ebp - 0x14]
jmp 0x10086398
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x49]
test eax, eax
jne 0x10085ead
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0xffffffff
xor eax, eax
jmp 0x10086398
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*4 + 0x78]
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x12]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov ecx, 1
sub ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x1c]
sar edx, cl
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x4c]
mov edx, dword [ebp + 8]
mov ax, word [ebp - 8]
mov word [edx + ecx*2 + 0x4e], ax
cmp dword [ebp - 0x24], 0
jne 0x1008607c
mov ecx, dword [ebp - 4]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x40]
mov eax, dword [ebp - 8]
lea ecx, [ecx + eax*2]
mov eax, 1
imul eax, eax, 0
movzx ecx, byte [ecx + eax]
shl ecx, 8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x40]
mov esi, dword [ebp - 8]
lea eax, [eax + esi*2]
mov esi, 1
shl esi, 0
movzx eax, byte [eax + esi]
or ecx, eax
and edx, ecx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x38]
add eax, edx
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx + 7]
add eax, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 3]
test ecx, ecx
je 0x10085f96
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0x38], 0x80
jl 0x10085f96
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
cmp eax, dword [edx + 0x3c]
jb 0x10085f94
push 0xe258
call fcn.100e9770
add esp, 4
jmp 0x10086398
jmp 0x10085f5c
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.1006e3d0
add esp, 8
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp + 0x14]
jg 0x10085fda
jl 0x10085fb8
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [ebp + 0x10]
jae 0x10085fda
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x1c]
jle 0x10085fd5
mov dword [ebp - 0x20], 0xffffffff
jmp 0x10086077
jmp 0x10086067
mov ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp + 0x14]
jl 0x10086008
jg 0x10085fec
mov edx, dword [ebp - 0x44]
cmp edx, dword [ebp + 0x10]
jbe 0x10086008
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x1c]
jle 0x10086006
mov dword [ebp - 0x20], 1
jmp 0x10086077
jmp 0x10086067
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
or eax, 2
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x48], al
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x44]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 0x40]
mov dword [edx + 0x1c], ecx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 8]
mov word [ecx + eax*2 + 0x4e], dx
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 5]
test ecx, ecx
jne 0x10086052
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
jmp 0x100862ce
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov dword [ebp - 0x14], 0
jmp 0x1008637c
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x1c]
sar ecx, 1
mov dword [ebp - 8], ecx
jmp 0x10085eff
jmp 0x1008629c
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x40]
mov ecx, dword [ebp - 8]
lea edx, [edx + ecx*2]
mov ecx, 1
imul ecx, ecx, 0
movzx edx, byte [edx + ecx]
shl edx, 8
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x40]
mov esi, dword [ebp - 8]
lea ecx, [ecx + esi*2]
mov esi, 1
shl esi, 0
movzx ecx, byte [ecx + esi]
or edx, ecx
and eax, edx
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x38]
add ecx, eax
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 7]
add ecx, eax
mov dword [ebp - 0xc], ecx
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + edx]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 8]
cmp dword [ebp - 0x18], eax
jg 0x1008610e
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, 1
shl edx, 0
add edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [ebp - 0x24]
add esp, 0xc
mov dword [ebp - 0x20], eax
jmp 0x10086226
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx + ecx]
and eax, 0x80
jne 0x1008616e
mov ecx, dword [ebp - 0x18]
and ecx, 0x7f
shl ecx, 7
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + edx]
add ecx, edx
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0xa]
cmp dword [ebp - 0x18], ecx
jg 0x1008616e
mov edx, dword [ebp + 0xc]
push edx
mov eax, 1
shl eax, 1
add eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [ebp - 0x24]
add esp, 0xc
mov dword [ebp - 0x20], eax
jmp 0x10086226
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 7]
mov ecx, dword [ebp - 0xc]
sub ecx, eax
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 8]
add edx, 0x18
push edx
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.10080e80
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cdq
push edx
push eax
call fcn.100690a0
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x100861c0
mov dword [ebp - 0x14], 7
jmp 0x1008637c
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x4c]
mov eax, dword [ebp + 8]
mov cx, word [ebp - 8]
mov word [eax + edx*2 + 0x4e], cx
push 2
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x18]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.10085350
add esp, 0x14
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x10086205
mov edx, dword [ebp - 0x28]
push edx
call sym.COMMON.dll_sqlite3_free
add esp, 4
jmp 0x1008637c
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [ebp - 0x24]
add esp, 0xc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
push eax
call sym.COMMON.dll_sqlite3_free
add esp, 4
cmp dword [ebp - 0x20], 0
jge 0x10086237
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x10086282
cmp dword [ebp - 0x20], 0
jle 0x10086248
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 0x1c], edx
jmp 0x10086282
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x4c]
mov eax, dword [ebp + 8]
mov cx, word [ebp - 8]
mov word [eax + edx*2 + 0x4e], cx
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 7]
test eax, eax
je 0x1008627d
mov dword [ebp - 0x14], 0xb
jmp 0x1008637c
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x1c]
jle 0x1008628c
jmp 0x1008629c
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x1c]
sar edx, 1
mov dword [ebp - 8], edx
jmp 0x1008607c
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 5]
test ecx, ecx
je 0x100862ce
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 8]
mov word [ecx + eax*2 + 0x4e], dx
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov dword [ebp - 0x14], 0
jmp 0x1008637c
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x12]
cmp dword [ebp - 0x10], eax
jl 0x100862f9
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx + 6]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
lea edx, [ecx + edx + 8]
push edx
call fcn.1006e8e0
add esp, 4
mov dword [ebp - 0x34], eax
jmp 0x10086349
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x40]
mov edx, dword [ebp - 0x10]
lea eax, [eax + edx*2]
mov edx, 1
imul edx, edx, 0
movzx eax, byte [eax + edx]
shl eax, 8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x40]
mov esi, dword [ebp - 0x10]
lea edx, [edx + esi*2]
mov esi, 1
shl esi, 0
movzx edx, byte [edx + esi]
or eax, edx
and ecx, eax
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x38]
push ecx
call fcn.1006e8e0
add esp, 4
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x4c]
mov eax, dword [ebp + 8]
mov cx, word [ebp - 0x10]
mov word [eax + edx*2 + 0x4e], cx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.100857f0
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x10086377
jmp 0x1008637c
jmp 0x10085ead
xor ecx, ecx
mov edx, dword [ebp + 8]
mov word [edx + 0x2c], cx
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x48]
and ecx, 0xfffffff9
mov edx, dword [ebp + 8]
mov byte [edx + 0x48], cl
mov eax, dword [ebp - 0x14]
pop esi
mov esp, ebp
pop ebp
ret