Function at 0x4c2f90
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0xdc
push ebx
mov ebx, dword [esp + 0xe8]
push ebp
push esi
mov esi, dword [esp + 0xec]
push edi
xor edi, edi
xor eax, eax
mov dword [esp + 0x10], eax
cmp eax, dword [esi]
jge 0x4c3382
mov ecx, dword [esi + 4]
lea ebp, [eax + eax*2]
shl ebp, 5
mov dl, byte [ecx + ebp + 0x5e]
and dl, 4
cmp dl, 4
je 0x4c3356
push eax
lea eax, [esp + 0xd0]
push 0x53c768
push eax
mov dword [esp + 0x30], 0x549bbc
mov dword [esp + 0x34], str.sqlite_master
mov dword [esp + 0x38], 0x549ba8
mov dword [esp + 0x3c], str.CREATE_TABLE_sqlite_master__n__type_text__n__name_text__n__tbl_name_text__n__rootpage_integer__n__sql_text_n_
call fcn.004e8361
xor edi, edi
lea edx, [esp + 0x30]
push edi
push edx
lea eax, [esp + 0x30]
lea ecx, [esp + 0xe0]
push 5
push eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], ebx
call fcn.004c33b0
push str.main
push str.sqlite_master
push esi
call fcn.004c6020
add esp, 0x28
cmp eax, edi
je 0x4c304a
mov byte [eax + 0x1c], 1
cmp dword [esp + 0x10], edi
jne 0x4c3095
lea ecx, [esp + 0x24]
push edi
push ecx
lea edx, [esp + 0x24]
push 5
push edx
mov dword [esp + 0x38], str.sqlite_temp_master
mov dword [esp + 0x40], str.CREATE_TEMP_TABLE_sqlite_temp_master__n__type_text__n__name_text__n__tbl_name_text__n__rootpage_integer__n__sql_text_n_
mov dword [esp + 0x44], 0x549b88
call fcn.004c33b0
push str.temp
push str.sqlite_temp_master
push esi
call fcn.004c6020
add esp, 0x1c
cmp eax, edi
je 0x4c3095
mov byte [eax + 0x1c], 1
mov eax, dword [esi + 4]
mov eax, dword [eax + ebp + 4]
cmp eax, edi
je 0x4c3356
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push edi
push 2
push eax
call dword [ecx + 0x34]
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4c30d5
push 0
push edi
call fcn.004c4120
add esp, 4
push eax
push ebx
call fcn.004c45d0
add esp, 0xc
jmp 0x4c3356
mov eax, dword [esi + 4]
lea edx, [esp + 0x3c]
push edx
mov eax, dword [eax + ebp + 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edi, eax
add esp, 8
test edi, edi
je 0x4c3114
push 0
push edi
call fcn.004c4120
add esp, 4
push eax
push ebx
call fcn.004c45d0
mov eax, dword [esp + 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
add esp, 0x10
jmp 0x4c3356
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x40]
mov dword [edx + ebp + 8], eax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4c3199
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x48]
mov dword [esi + 0xd0], ecx
mov cl, byte [esp + 0x44]
test eax, eax
mov byte [esi + 0xcc], cl
jne 0x4c3148
mov eax, 0x7d0
mov dword [esi + 0xd4], eax
mov al, byte [esp + 0x4c]
test al, al
mov byte [esi + 0xcd], al
jne 0x4c3163
mov byte [esi + 0xcd], 2
test cl, cl
jne 0x4c3170
mov byte [esi + 0xcc], 4
jmp 0x4c31bb
cmp cl, 4
jbe 0x4c31bb
mov eax, dword [esp + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 0x30]
push 0
push str.unsupported_file_format
push ebx
call fcn.004c45d0
add esp, 0x10
mov edi, 1
jmp 0x4c3356
mov al, byte [esi + 0xcc]
mov ecx, dword [esp + 0x44]
mov edx, eax
and edx, 0xff
cmp edx, ecx
jne 0x4c330e
cmp al, 4
jb 0x4c330e
mov eax, dword [esi + 4]
mov edx, dword [esi + 0xd4]
push edx
mov eax, dword [eax + ebp + 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
mov ecx, dword [esp + 0x54]
add esp, 8
test ecx, ecx
jne 0x4c31df
mov ecx, 2
mov eax, dword [esi + 4]
push ecx
mov eax, dword [eax + ebp + 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov ecx, 0x1a
xor eax, eax
lea edi, [esp + 0x6c]
add esp, 8
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x1c]
test edi, edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x6c], fcn.004c33b0
mov dword [esp + 0x70], eax
mov byte [esp + 0x9e], 1
mov byte [esp + 0xa2], 1
jne 0x4c324e
mov al, byte [esi + 0xcc]
cmp al, 2
mov eax, str.SELECT_type__name__rootpage__sql__1_FROM_sqlite_temp_master_UNION_ALL_SELECT_type__name__rootpage__sql__0_FROM_sqlite_master
jae 0x4c323d
mov eax, str.SELECT_type__name__rootpage__sql__1_FROM_sqlite_temp_master_UNION_ALL_SELECT_type__name__rootpage__sql__0_FROM_sqlite_master_WHERE_typetable_UNION_ALL_SELECT_type__name__rootpage__sql__0_FROM_sqlite_master_WHERE_typeindex
push ebx
lea ecx, [esp + 0x68]
push eax
push ecx
call fcn.004c9790
add esp, 0xc
jmp 0x4c32a0
mov edx, dword [esi + 4]
mov dword [esp + 0x14], 0
push 0
push str._.sqlite_master
mov eax, dword [edx + ebp]
lea ecx, [esp + 0xd4]
push eax
push str._FROM__
push ecx
lea edx, [esp + 0x28]
push str.SELECT_type__name__rootpage__sql_
push edx
call fcn.004c45d0
mov eax, dword [esp + 0x30]
push ebx
lea ecx, [esp + 0x84]
push eax
push ecx
call fcn.004c9790
mov edx, dword [esp + 0x3c]
push edx
call fcn.004c4480
add esp, 0x2c
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [0x582830]
add esp, 4
test eax, eax
je 0x4c32d6
push 0
push str.out_of_memory
push ebx
call fcn.004c45d0
push 0
push esi
mov dword [esp + 0x7c], 7
call fcn.004c6270
add esp, 0x14
mov eax, dword [esp + 0x68]
test eax, eax
jne 0x4c32fe
mov edx, dword [esi + 4]
or byte [edx + ebp + 0x5e], 4
test edi, edi
lea eax, [edx + ebp + 0x5e]
jne 0x4c3308
mov eax, dword [esi + 4]
or byte [eax + 0xbe], 4
mov edi, dword [esp + 0x68]
jmp 0x4c3356
push edi
push esi
call fcn.004c6270
add esp, 8
mov edi, dword [esp + 0x68]
jmp 0x4c3356
test ecx, ecx
push 0
jne 0x4c3322
mov eax, dword [esi + 4]
mov ecx, dword [eax + ebp]
push ecx
push str.cannot_attach_empty_database:
jmp 0x4c332e
mov edx, dword [esi + 4]
mov eax, dword [edx + ebp]
push eax
push str.incompatible_file_format_in_auxiliary_database:
push ebx
call fcn.004c45d0
mov ecx, dword [esi + 4]
add esp, 0x10
mov eax, dword [ecx + ebp + 4]
push eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [esi + 4]
add esp, 4
mov edi, 0x18
mov dword [eax + ebp + 4], 0
mov eax, dword [esp + 0x10]
inc eax
test edi, edi
mov dword [esp + 0x10], eax
je 0x4c2fb0
mov eax, dword [esi + 0xc8]
and al, 0xfd
mov dword [esi + 0xc8], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret
test edi, edi
jne 0x4c3367
mov edx, dword [esi + 0xc8]
push esi
or edx, 2
mov dword [esi + 0xc8], edx
call fcn.004c6490
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret