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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
xor eax, eax
push edi
mov edi, dword [esi]
add ebx, 0x28
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x18], eax
mov eax, 8
mov ecx, ebx
mov dword [esp + 0x1c], edi
mov dword [esi + 0x14], ebx
call fcn.100206c0
cmp dword [esi + 0x5c], 7
jne 0x1002089d
mov eax, 1
mov byte [edi + 0x1e], al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x62], 1
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x14], edx
jne 0x1002091f
mov eax, dword [esi + 8]
add eax, 0x168
test byte [eax + 0x1c], 0x10
mov dword [esp + 0x18], eax
je 0x100208cd
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 4]
shr ecx, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
xor ecx, ecx
xor edi, edi
xor eax, eax
cmp dword [esp + 0x10], 2
jl 0x10020901
lea ebx, [ebx]
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4]
add ecx, dword [edx + 4]
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4 + 4]
add edi, dword [edx + 4]
mov edx, dword [esp + 0x10]
add eax, 2
dec edx
cmp eax, edx
jl 0x100208e0
cmp eax, dword [esp + 0x10]
jge 0x10020917
mov edx, dword [esp + 0xc]
mov eax, dword [edx + eax*4]
mov edx, dword [esp + 0x14]
add edx, dword [eax + 4]
jmp 0x1002091b
mov edx, dword [esp + 0x14]
add edi, ecx
add edx, edi
mov eax, dword [esi + 0x58]
lea ecx, [eax + 1]
mov dword [esi + 0x58], ecx
cmp eax, edx
jge 0x10020982
cmp byte [esi + 0x62], 2
jne 0x1002093e
mov edi, dword [esi + 4]
lea ecx, [eax + eax*4]
cmp byte [edi + ecx*4], 0x8a
jne 0x1002091f
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0xe0]
test ecx, ecx
je 0x10020997
mov dword [esi + 0x5c], 9
mov eax, dword [str.interrupted]
mov ebx, 1
test eax, eax
jne 0x10020966
mov eax, str.unknown_error
push eax
push 0x10075ca4
lea edi, [esi + 0x38]
mov eax, edx
call fcn.10004510
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, 0x65
mov dword [esi + 0x5c], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x1c]
cmp eax, ecx
jge 0x100209ad
mov ecx, dword [esi + 4]
lea edx, [eax + eax*4]
lea edi, [ecx + edx*4]
mov dword [esp + 0x14], edi
jmp 0x100209e3
mov edi, dword [esp + 0xc]
sub eax, ecx
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
xor edx, edx
cmp eax, ecx
jl 0x100209ce
mov edi, edi
sub eax, ecx
mov ecx, dword [edi + edx*4 + 4]
mov ecx, dword [ecx + 4]
inc edx
cmp eax, ecx
jge 0x100209c0
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + edx*4]
mov edx, dword [edx]
lea ecx, [eax + eax*4]
lea ecx, [edx + ecx*4]
mov dword [esp + 0x14], ecx
mov edi, ecx
cmp byte [esi + 0x62], 1
jne 0x10020a9d
mov edx, 4
mov word [ebx + 0x1c], dx
cdq
mov dword [ebx + 0x10], eax
mov byte [ebx + 0x1e], 1
mov dword [ebx + 0x14], edx
mov eax, 0xa02
mov word [ebx + 0x44], ax
movzx ecx, byte [edi]
mov eax, dword [ecx*4 + 0x10072a58]
mov dword [ebx + 0x2c], eax
mov ecx, eax
test eax, eax
je 0x10020a30
cmp byte [eax], 0
je 0x10020a28
inc ecx
cmp byte [ecx], 0
jne 0x10020a22
sub ecx, eax
and ecx, 0x3fffffff
mov dword [ebx + 0x40], ecx
mov word [ebx + 0x46], 0x103
add ebx, 0x50
cmp byte [edi + 1], 0xee
jne 0x10020a9d
mov ecx, dword [esp + 0x10]
xor eax, eax
lea esi, [ecx*4 + 4]
test ecx, ecx
jle 0x10020a6a
mov edi, dword [edi + 0x10]
mov edx, dword [esp + 0xc]
lea ebx, [ebx]
cmp dword [edx + eax*4], edi
je 0x10020a6a
inc eax
cmp eax, ecx
jl 0x10020a60
cmp eax, ecx
jne 0x10020a9d
mov edi, dword [esp + 0x18]
mov eax, 1
mov ecx, esi
call fcn.1001e550
test eax, eax
jne 0x10020a9d
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 0x10]
mov eax, edi
mov edx, dword [eax + 4]
mov edi, dword [esp + 0x10]
mov dword [edx + edi*4], ecx
or word [eax + 0x1c], 0x10
mov dword [eax + 0x18], esi
mov ecx, dword [esp + 0x14]
mov edx, 4
mov word [ebx + 0x1c], dx
mov eax, dword [ecx + 4]
cdq
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov byte [ebx + 0x1e], 1
mov eax, 4
mov word [ebx + 0x44], ax
mov eax, dword [ecx + 8]
cdq
mov dword [ebx + 0x3c], edx
mov dword [ebx + 0x38], eax
mov byte [ebx + 0x46], 1
mov edx, 4
mov word [ebx + 0x6c], dx
mov eax, dword [ecx + 0xc]
cdq
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x64], edx
mov byte [ebx + 0x6e], 1
mov eax, dword [ebx + 0x78]
mov ecx, dword [ebx + 0x9c]
add ebx, 0x78
mov dword [esp + 0x1c], ebx
test eax, eax
je 0x10020b17
test ecx, ecx
je 0x10020b17
cmp ecx, dword [eax + 0x104]
jb 0x10020b17
cmp ecx, dword [eax + 0x108]
jae 0x10020b17
movzx eax, word [eax + 0xe8]
jmp 0x10020b21
push ecx
call dword [0x1007cc94]
add esp, 4
cmp eax, 0x20
jge 0x10020b44
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx]
push eax
push ecx
call fcn.10004120
mov esi, dword [ebx]
add esp, 8
mov ecx, 0x20
call fcn.10004360
mov dword [ebx + 0x24], eax
mov edx, 0x400
test word [ebx + 0x1c], dx
je 0x10020b5f
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x10020b5f
mov ecx, dword [ebx + 4]
push ecx
call eax
add esp, 4
mov edi, dword [ebx + 0x24]
mov dword [ebx + 4], edi
test edi, edi
jne 0x10020b74
mov edx, 1
mov word [ebx + 0x1c], dx
jmp 0x10020b7d
mov eax, 0xe7ff
and word [ebx + 0x1c], ax
mov dword [ebx + 0x20], 0
test edi, edi
jne 0x10020b94
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
mov ecx, 0x602
mov word [ebx + 0x1c], cx
call fcn.100203d0
mov ecx, dword [ebx + 4]
mov edi, eax
cmp edi, ecx
je 0x10020c90
test edi, edi
jne 0x10020c00
test byte [ebx + 0x1c], 0x40
je 0x10020bd1
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xdc]
mov dword [eax + 0x3c], edx
mov dword [ecx + 0xdc], eax
test byte [ebx + 0x1c], 0x20
je 0x10020be3
mov ebx, dword [ebx + 0x10]
call fcn.1000b2c0
mov ebx, dword [esp + 0x1c]
mov ax, word [ebx + 0x1c]
mov ecx, 0xbf01
and ax, cx
or ax, 1
mov word [ebx + 0x1c], ax
mov byte [ebx + 0x1e], 5
jmp 0x10020cb4
mov eax, dword [ebx]
test eax, eax
je 0x10020c0b
mov eax, dword [eax + 0x48]
jmp 0x10020c10
mov eax, 0x3b9aca00
xor esi, esi
test eax, eax
js 0x10020c21
cmp byte [esi + edi], 0
je 0x10020c21
inc esi
cmp esi, eax
jle 0x10020c16
xor edx, edx
mov dword [esp + 0x1c], 0x202
mov eax, ebx
cmp edx, fcn.10004120
jne 0x10020c55
call fcn.1001e8a0
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx]
push eax
push ecx
call fcn.10004120
add esp, 8
mov dword [ebx + 0x24], edi
mov dword [ebx + 0x20], 0
jmp 0x10020c79
call fcn.1001e8a0
mov edx, dword [ebx + 0x24]
mov eax, dword [ebx]
push edx
push eax
call fcn.10004120
add esp, 8
xor eax, eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], eax
mov dword [esp + 0x1c], 0xa02
mov cx, word [esp + 0x1c]
mov dword [ebx + 4], edi
mov dword [ebx + 0x18], esi
mov word [ebx + 0x1c], cx
mov word [ebx + 0x1e], 0x103
jmp 0x10020cb4
mov eax, ecx
test ecx, ecx
je 0x10020cad
cmp byte [ecx], 0
je 0x10020ca6
jmp 0x10020ca0
inc eax
cmp byte [eax], 0
jne 0x10020ca0
sub eax, ecx
and eax, 0x3fffffff
mov dword [ebx + 0x18], eax
mov byte [ebx + 0x1f], 1
mov eax, dword [ebp + 8]
mov byte [ebx + 0x1e], 3
cmp byte [eax + 0x62], 1
jne 0x10020d18
xor eax, eax
lea ecx, [eax + 4]
lea edi, [ebx + 0x28]
call fcn.1001e550
test eax, eax
jne 0x10020b88
mov eax, dword [esp + 0x14]
mov edx, 0x602
mov word [ebx + 0x44], dx
mov edx, dword [ebx + 0x2c]
mov dword [ebx + 0x40], 2
movzx ecx, byte [eax + 3]
push ecx
push str._.2x
push edx
push 3
call sym.sqlite3.dll_sqlite3_snprintf
mov eax, 1
mov word [ebx + 0x46], 0x103
mov word [ebx + 0x6c], ax
mov eax, dword [ebp + 8]
add esp, 0x10
mov byte [ebx + 0x6e], 5
movzx ecx, byte [eax + 0x62]
dec cx
mov edx, 2
sub dx, cx
add dx, dx
pop edi
add dx, dx
mov ebx, 0x64
mov word [eax + 0x30], dx
mov dword [eax + 0x5c], 0
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret