Function at 0x491525
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0xffffffff
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x28]
add edx, 1
mov eax, dword [ecx + 0x2c]
adc eax, 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x28], edx
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 0x30], 0xb
je 0x491834
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x30]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
sub edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 8
ja case.0x49151e.1
mov eax, dword [ebp - 0x14]
jmp dword [eax*4 + 0x49183c]
call fcn.00499b00
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x34], eax
jl 0x491548
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x30], 7
jmp 0x49157a
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x34]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x34]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], ecx
mov eax, dword [ebp - 4]
add eax, 0x1c
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x18
push ecx
mov edx, dword [ebp - 0x30]
push edx
call fcn.00499b10
add esp, 0xc
mov dword [ebp - 8], 0xffffffff
jmp case.0x49151e.1
mov eax, dword [ebp - 4]
cmp dword [eax + 0x20], 0
jne 0x4915ae
push 0
mov ecx, dword [ebp - 4]
add ecx, 0x20
push ecx
push 0xffffffffffffffff
push 0x5e0e84
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
push eax
call fcn.004a83a0
add esp, 0x14
mov dword [ebp - 8], 1
mov dword [ebp - 0x18], 8
jmp case.0x49151e.1
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x20], 0
jne 0x491685
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x24], 0x5f556f
push 0
lea edx, [ebp - 0x1c]
push edx
push 0xffffffffffffffff
push 0x5e0e9c
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
push ecx
call fcn.004a83a0
add esp, 0x14
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004a8fa0
add esp, 4
cmp eax, 0x64
jne 0x49164f
push 1
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004a9250
add esp, 8
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0xc]
push eax
push str._z_sSELECT_name_FROM___w_.sqlite_schema
call fcn.004a72b0
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x491646
mov eax, 7
jmp 0x491836
mov dword [ebp - 0x24], 0x5e0edc
jmp 0x4915f8
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004a9590
add esp, 4
push 0
mov edx, dword [ebp - 4]
add edx, 0x20
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call fcn.004a83a0
add esp, 0x14
mov eax, dword [ebp - 0xc]
push eax
call fcn.004a74c0
add esp, 4
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 9
jmp case.0x49151e.1
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x20], 0
jne 0x491760
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2c], 0x5f55b4
push 0
lea edx, [ebp - 0x20]
push edx
push 0xffffffffffffffff
push 0x5e0ee4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
push ecx
call fcn.004a83a0
add esp, 0x14
mov edx, dword [ebp - 0x20]
push edx
call fcn.004a8fa0
add esp, 4
cmp eax, 0x64
jne 0x49172a
push 1
mov eax, dword [ebp - 0x20]
push eax
call fcn.004a9250
add esp, 8
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push str._z_sSELECT_pti.name_FROM___w_.sqlite_schema_AS_sm_JOIN_pragma_table_info_sm.name__Q__AS_pti_WHERE_sm.typetable
call fcn.004a72b0
add esp, 0x14
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x491721
mov eax, 7
jmp 0x491836
mov dword [ebp - 0x2c], str._UNION
jmp 0x4916cf
mov edx, dword [ebp - 0x20]
push edx
call fcn.004a9590
add esp, 4
push 0
mov eax, dword [ebp - 4]
add eax, 0x20
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
push eax
call fcn.004a83a0
add esp, 0x14
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004a74c0
add esp, 4
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0xb
cmp dword [ebp - 8], 0
jge 0x491784
mov edx, dword [ebp - 4]
cmp dword [edx + 0x18], 0
jne 0x491782
jmp 0x4914f2
jmp 0x4917f3
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x20]
push ecx
call fcn.004a8fa0
add esp, 4
cmp eax, 0x64
jne 0x4917cc
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x20]
push ecx
call fcn.004a9250
add esp, 8
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], eax
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x20]
push edx
call fcn.004a94d0
add esp, 8
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x1c], eax
jmp 0x4917f3
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x20]
push eax
call fcn.004a9590
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x20], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x30], eax
jmp 0x4914f2
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], 0
jne 0x4917fe
jmp 0x491834
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 8]
cmp ecx, dword [eax + 0x1c]
jg 0x49182f
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.0049d0d0
add esp, 0xc
test eax, eax
jne 0x49182f
jmp 0x491834
jmp 0x4914f2
xor eax, eax
mov esp, ebp
pop ebp
ret