Function at 0x10209560
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x10291210]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x30], eax
xor eax, eax
or ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x10], eax
cmp edi, eax
je 0x102095fd
mov ecx, str.sqlite_stat1
mov esi, edi
sub esi, ecx
movzx eax, byte [ecx]
movzx edx, byte [esi + ecx]
cmp eax, edx
jne 0x102095e6
test eax, eax
jne 0x102095f8
mov ecx, dword [esp + 0x20]
push ecx
push str.SELECT_tbl___2__stat_FROM__Q.sqlite_stat1_WHERE_tbl_IS__1_AND_idx_IS__CASE_WHEN__2X_THEN_NULL_ELSE__2_END_
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov esi, eax
add esp, 8
test esi, esi
jne 0x1020985b
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.100fd740
mov esp, ebp
pop ebp
ret
movzx edx, byte [edx + 0x1026d428]
movzx eax, byte [eax + 0x1026d428]
sub eax, edx
jne 0x102095fb
inc ecx
jmp 0x102095a6
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, 0xe
mov dword [esp + 0x30], 0x10275ad6
call fcn.10201110
add esp, 8
test eax, eax
jne 0x10209664
mov eax, dword [esp + 0x18]
mov edx, dword [str.SELECT__FROM]
mov ecx, dword [esp + 0x14]
mov dword [eax + ecx], edx
mov edx, dword [0x1027c9b4]
mov dword [eax + ecx + 4], edx
mov edx, dword [0x1027c9b8]
mov dword [eax + ecx + 8], edx
mov dx, word [0x1027c9bc]
mov word [eax + ecx + 0xc], dx
add eax, 0xe
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea ebx, [esp + 0x18]
call fcn.10203210
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov edx, ebx
push edx
mov eax, 1
call fcn.10201110
add esp, 8
test eax, eax
jne 0x102096a8
mov eax, dword [esp + 0x18]
mov cl, byte [0x10275d34]
mov edx, dword [esp + 0x14]
mov byte [eax + edx], cl
inc eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
mov esi, edi
lea ebx, [esp + 0x18]
call fcn.10203210
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov edx, ebx
push edx
mov eax, 7
call fcn.10201110
mov ebx, dword [esp + 0x1c]
add esp, 8
test eax, eax
jne 0x10209702
mov eax, dword [esp + 0x18]
mov ecx, dword [str._WHERE]
mov dword [eax + ebx], ecx
mov dx, word [0x1027c9c4]
mov word [eax + ebx + 4], dx
mov cl, byte [0x1027c9c6]
mov byte [eax + ebx + 6], cl
add eax, 7
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x1020984d
mov edx, dword [esp + 0x24]
mov edi, 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
cmp byte [eax + edi - 1], 0
je 0x1020983d
mov ebx, dword [esp + 0x28]
test ebx, ebx
jne 0x10209738
xor esi, esi
jmp 0x10209750
mov eax, ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10209740
sub eax, edx
and eax, 0x3fffffff
mov esi, eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
push edx
mov eax, esi
call fcn.10201110
add esp, 8
test eax, eax
jne 0x10209784
mov eax, dword [esp + 0x14]
push esi
push ebx
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + eax]
push ecx
call fcn.100ffb30
add esp, 0xc
add ebx, esi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x20]
mov esi, dword [eax]
lea edx, [esp + 0x10]
push edx
lea ebx, [esp + 0x18]
call fcn.10203210
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov edx, ebx
push edx
mov eax, 5
call fcn.10201110
add esp, 8
test eax, eax
jne 0x102097d6
mov eax, dword [esp + 0x18]
mov edx, dword [str._IS__]
mov ecx, dword [esp + 0x14]
mov dword [eax + ecx], edx
mov dl, byte [0x1027c9cc]
mov byte [eax + ecx + 4], dl
add eax, 5
mov dword [esp + 0x18], eax
push edi
push 0x10275020
lea eax, [esp + 0x3c]
push eax
push 0x17
call sym.SQLite.Interop.dll_sqlite3_snprintf
lea eax, [esp + 0x44]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x102097f2
sub eax, edx
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
and eax, 0x3fffffff
push edx
mov esi, eax
call fcn.10201110
mov ebx, dword [esp + 0x1c]
add esp, 8
test eax, eax
jne 0x10209835
mov ecx, dword [esp + 0x18]
push esi
lea eax, [esp + 0x38]
push eax
add ecx, ebx
push ecx
call fcn.100ffb30
add esp, 0xc
add dword [esp + 0x18], esi
mov dword [esp + 0x28], str._AND
add dword [esp + 0x20], 4
inc edi
dec dword [esp + 0x24]
jne 0x1020971e
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ebx, dword [esp + 0x18]
test edi, edi
jne 0x1020987a
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push 0
push edx
push 0
push 0x80
push ebx
push esi
push eax
call fcn.101fbc70
add esp, 0x1c
mov edi, eax
test esi, esi
je 0x102098d6
cmp dword [0x10292428], 0
je 0x102098cc
mov eax, dword [0x10299778]
test eax, eax
je 0x1020989a
push eax
call dword [0x10292478]
add esp, 4
push esi
call dword [0x10292454]
sub dword [0x10299710], eax
dec dword [0x10299734]
add esp, 4
push esi
call dword [0x1029244c]
mov eax, dword [0x10299778]
add esp, 4
test eax, eax
je 0x102098d6
push eax
call dword [0x10292480]
jmp 0x102098d3
push esi
call dword [0x1029244c]
add esp, 4
mov ecx, dword [esp + 0x4c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100fd740
mov esp, ebp
pop ebp
ret