Function at 0x49b8f4
Capabilities:
Reference sql statements

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
or edi, 0xffffffff
add dword [esi + 0x28], 1
adc dword [esi + 0x2c], ebx
cmp dword [esi + 0x30], 0xb
je 0x49b9b7
nop
mov eax, dword [esi + 0x30]
dec eax
cmp eax, 8
ja case.0x49b8ed.2
jmp dword [eax*4 + 0x49bb54]
mov edi, dword [esi + 0x34]
call fcn.004ba4f0
cmp edi, eax
jl 0x49b916
mov dword [esi + 0x18], 0
mov dword [esi + 0x30], 7
or edi, 0xffffffff
jmp 0x49bb13
lea ecx, [esi + 0x1c]
push ecx
lea edx, [esi + 0x18]
push edx
lea eax, [edi + 1]
push edi
mov dword [esi + 0x34], eax
call fcn.004ba4b0
add esp, 0xc
or edi, 0xffffffff
jmp 0x49bb13
cmp dword [esi + 0x20], 0
lea eax, [esi + 0x20]
jne 0x49b954
push 0
push eax
mov eax, dword [esi + 4]
push 0xffffffffffffffff
push str.PRAGMA_database_list
push eax
call fcn.00521340
add esp, 0x14
mov edi, 1
lea ebx, [edi + 7]
mov eax, dword [esi + 0x20]
push eax
call fcn.00527980
add esp, 4
cmp eax, 0x64
jne 0x49bb1e
mov ecx, dword [esi + 0x20]
push edi
push ecx
call fcn.004d0010
mov edx, dword [esi + 0x20]
push edi
push edx
mov dword [esi + 0x18], eax
call fcn.004cfef0
add esp, 0x10
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x49b9b7
cmp eax, dword [esi + 0x1c]
jg 0x49bb34
mov ecx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 0x18]
push eax
push ecx
call fcn.004ad1c0
add esp, 0xc
test eax, eax
jne 0x49bb34
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
cmp dword [esi + 0x20], 0
lea ebp, [esi + 0x20]
jne 0x49ba5f
mov edx, dword [esi + 4]
xor edi, edi
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0xffffffffffffffff
push str.PRAGMA_database_list
push edx
mov ebx, 0x5d3001
call fcn.00521340
mov eax, dword [esp + 0x2c]
push eax
call fcn.00527980
add esp, 0x18
cmp eax, 0x64
jne 0x49ba3d
jmp 0x49ba00
mov ecx, dword [esp + 0x18]
push 1
push ecx
call fcn.004d0010
push eax
push ebx
push edi
push str._z_sSELECT_name_FROM___w_.sqlite_master
call fcn.004d32a0
mov edi, eax
add esp, 0x18
test edi, edi
je 0x49bb46
mov edx, dword [esp + 0x18]
push edx
mov ebx, str._UNION
call fcn.00527980
add esp, 4
cmp eax, 0x64
je 0x49ba00
mov eax, dword [esp + 0x18]
push eax
call fcn.005127b0
mov ecx, dword [esi + 4]
push 0
push ebp
push 0xffffffffffffffff
push edi
push ecx
call fcn.00521340
push edi
call fcn.004acb60
add esp, 0x1c
xor edi, edi
lea ebx, [edi + 9]
jmp 0x49b95c
cmp dword [esi + 0x20], 0
lea ebp, [esi + 0x20]
jne 0x49bb01
mov eax, dword [esi + 4]
xor edi, edi
push edi
lea edx, [esp + 0x14]
push edx
push 0xffffffffffffffff
push str.PRAGMA_database_list
push eax
mov ebx, 0x5d3001
call fcn.00521340
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00527980
add esp, 0x18
cmp eax, 0x64
jne 0x49badf
mov edx, dword [esp + 0x10]
push 1
push edx
call fcn.004d0010
push eax
push eax
push ebx
push edi
push str._z_sSELECT_pti.name_FROM___w_.sqlite_master_AS_sm_JOIN_pragma_table_info_sm.name__Q__AS_pti_WHERE_sm.typetable
call fcn.004d32a0
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x49bb46
mov eax, dword [esp + 0x10]
push eax
mov ebx, str._UNION
call fcn.00527980
add esp, 4
cmp eax, 0x64
je 0x49baa5
mov ecx, dword [esp + 0x10]
push ecx
call fcn.005127b0
mov edx, dword [esi + 4]
push 0
push ebp
push 0xffffffffffffffff
push edi
push edx
call fcn.00521340
push edi
call fcn.004acb60
add esp, 0x1c
xor edi, edi
lea ebx, [edi + 0xb]
jmp 0x49b95c
test edi, edi
jge 0x49b95c
cmp dword [esi + 0x18], 0
je 0x49bb34
jmp 0x49b98e
mov edx, dword [esi + 0x20]
push edx
call fcn.005127b0
add esp, 4
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], ebx
cmp dword [esi + 0x30], 0xb
jne 0x49b8e0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
pop ecx
ret