Function at 0x4a5470
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x7c
mov eax, dword [0x63727c]
xor eax, esp
mov dword [esp + 0x78], eax
cmp dword [esp + 0x84], 2
mov eax, dword [esp + 0x88]
push ebx
push ebp
mov ebp, dword [esp + 0x88]
push esi
jl 0x4a54a2
mov eax, dword [eax + 4]
mov dword [esp + 0x10], eax
jmp 0x4a54aa
mov dword [esp + 0x10], str.main
xor ebx, ebx
mov esi, ebp
mov dword [esp + 0xc], 0
call fcn.004a5270
mov eax, dword [ebp]
test eax, eax
je 0x4a57ac
push ebx
lea ecx, [esp + 0x10]
push ecx
push 0xffffffffffffffff
push str.SELECT_data_FROM_sqlite_dbpage__1__WHERE_pgno1
push eax
call fcn.00521170
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push ebx
push 0xffffffffffffffff
push edx
push 1
push eax
call fcn.004ebd70
mov ecx, dword [esp + 0x34]
push ecx
call fcn.005277b0
add esp, 0x2c
cmp eax, 0x64
jne 0x4a578c
mov edx, dword [esp + 0xc]
push ebx
push edx
call fcn.004cfd30
add esp, 8
cmp eax, 0x64
jle 0x4a578c
mov eax, dword [esp + 0xc]
push edi
push ebx
push eax
call fcn.004d5b40
mov esi, eax
mov ecx, 0x19
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x18]
push ecx
call fcn.005125e0
movzx eax, byte [esp + 0x40]
movzx edx, byte [esp + 0x41]
shl eax, 8
add eax, edx
add esp, 0xc
cmp eax, 1
jne 0x4a5559
mov eax, 0x10000
push eax
mov eax, dword [ebp + 0x18]
push str.database_page_size:
push str.__20s__d_n
push eax
call fcn.00495cb0
movzx ecx, byte [esp + 0x46]
mov edx, dword [ebp + 0x18]
push ecx
push str.write_format:
push str.__20s__d_n
push edx
call fcn.00495cb0
movzx eax, byte [esp + 0x57]
mov ecx, dword [ebp + 0x18]
push eax
push str.read_format:
push str.__20s__d_n
push ecx
call fcn.00495cb0
movzx edx, byte [esp + 0x68]
mov eax, dword [ebp + 0x18]
push edx
push str.reserved_bytes:
push str.__20s__d_n
push eax
call fcn.00495cb0
add esp, 0x40
mov ebx, 0x5e4c88
mov edi, dword [ebx + 4]
movzx esi, byte [esp + edi + 0x24]
movzx ecx, byte [esp + edi + 0x25]
movzx edx, byte [esp + edi + 0x26]
movzx eax, byte [esp + edi + 0x27]
shl esi, 8
add esi, ecx
mov ecx, dword [ebx]
shl esi, 8
add esi, edx
mov edx, dword [ebp + 0x18]
shl esi, 8
add esi, eax
push esi
push ecx
push str.__20s__u
push edx
call fcn.00495cb0
add esp, 0x10
cmp edi, 0x38
jne 0x4a5636
cmp esi, 1
jne 0x4a5610
mov eax, dword [ebp + 0x18]
push str.__utf8_
push eax
jmp 0x4a562e
cmp esi, 2
jne 0x4a5620
mov ecx, dword [ebp + 0x18]
push str.__utf16le_
push ecx
jmp 0x4a562e
cmp esi, 3
jne 0x4a5636
mov edx, dword [ebp + 0x18]
push str.__utf16be_
push edx
call fcn.00589fad
add esp, 8
mov eax, dword [ebp + 0x18]
push 0x5e3518
push eax
call fcn.00589fad
add ebx, 8
add esp, 8
cmp ebx, 0x5e4ce8
jl 0x4a55c0
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x4a566d
push str.main.sqlite_master
call fcn.004d30e0
add esp, 4
jmp 0x4a56b7
mov ecx, 0x5e5474
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4a5694
test dl, dl
je 0x4a5690
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4a5694
add eax, 2
add ecx, 2
test dl, dl
jne 0x4a5674
xor eax, eax
jmp 0x4a5699
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4a56a9
push str.sqlite_temp_master
push 0x5e3678
jmp 0x4a56af
push esi
push str.__w_.sqlite_master
call fcn.004d30e0
add esp, 8
mov dword [esp + 0x18], eax
mov esi, 0x5e4ce8
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 4]
push ecx
push edx
call fcn.004d30e0
mov ecx, dword [ebp]
mov edi, eax
xor ebx, ebx
push ebx
lea eax, [esp + 0x28]
push eax
push 0xffffffffffffffff
push edi
push ecx
call fcn.00521170
mov eax, dword [esp + 0x38]
add esp, 0x1c
test eax, eax
je 0x4a570d
push eax
call fcn.005277b0
add esp, 4
cmp eax, 0x64
jne 0x4a570d
mov edx, dword [esp + 0x1c]
push ebx
push edx
call fcn.004c5b70
add esp, 8
mov ebx, eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.005125e0
push edi
call fcn.004ac9a0
mov ecx, dword [esi]
mov edx, dword [ebp + 0x18]
push ebx
push ecx
push str.__20s__d_n
push edx
call fcn.00495cb0
add esi, 8
add esp, 0x18
cmp esi, 0x5e4d10
jl 0x4a56c0
mov eax, dword [esp + 0x18]
push eax
call fcn.004ac9a0
mov edx, dword [esp + 0x18]
mov eax, dword [ebp]
lea ecx, [esp + 0x24]
push ecx
push 0x23
push edx
push eax
call fcn.004cb3c0
mov ecx, dword [esp + 0x34]
mov edx, dword [ebp + 0x18]
push ecx
push 0x5e7a14
push str.__20s__u_n
push edx
call fcn.00495cb0
add esp, 0x24
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00584267
add esp, 0x7c
ret
push str.unable_to_read_database_header_n
call fcn.0058b93f
add eax, 0x40
push eax
call fcn.00589fad
mov eax, dword [esp + 0x14]
push eax
call fcn.005125e0
add esp, 0xc
mov ecx, dword [esp + 0x84]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00584267
add esp, 0x7c
ret