Function at 0x4934b3
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, edx
mov ebx, eax
sub esp, 0x7c
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x4c], ecx
mov dword [eax + 0xc], edx
jne 0x49356d
lea eax, [ebx + 0x50]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [ebp - 0x38], eax
lea eax, [ebx + 0x54]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4f3156
mov dword [ebp - 0x34], eax
lea eax, [ebx + 0x58]
mov dword [ebp - 0x30], eax
lea eax, [ebx + 0x5c]
mov dword [ebp - 0x2c], eax
lea eax, [ebx + 0x60]
mov dword [ebp - 0x28], eax
lea eax, [ebx + 0x64]
mov dword [ebp - 0x24], eax
lea eax, [ebx + 0x68]
mov dword [ebp - 0x20], eax
lea eax, [ebx + 0x6c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00490c89
test eax, eax
je 0x493674
cmp eax, 1
mov edx, 0
mov dword [ebx + 0x30], 0x100000
mov dword [ebx + 0x34], 0
cmove eax, edx
jmp 0x49373f
mov dword [esp], edx
call fcn.00436e52
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], eax
call fcn.0041ad88
xor eax, eax
movzx edx, byte [ebx + 0x19]
cmp eax, edx
jge 0x4935bc
mov dword [esp + 8], eax
mov dword [esp + 4], str._a_d
mov dword [esp], edi
mov dword [ebp - 0x50], eax
call fcn.0041ad88
mov eax, dword [ebp - 0x50]
inc eax
jmp 0x493597
mov eax, dword [ebp + 8]
mov dword [esp], edi
mov dword [esp + 4], str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], eax
call fcn.0041ad88
mov eax, dword [ebp + 8]
mov dword [esp], edi
mov dword [esp + 4], str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], eax
call fcn.0041ad88
mov eax, dword [ebx + 0x10]
mov dword [esp], edi
mov dword [esp + 4], str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], eax
call fcn.0041ad88
mov dword [esp], edi
call fcn.0041b064
test eax, eax
mov edi, eax
jne 0x493635
mov eax, 7
jmp 0x4938f5
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00477ee4
mov dword [esp], edi
mov dword [ebp - 0x50], eax
call fcn.0040b268
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x4934d0
jmp 0x4938f5
mov eax, dword [ebx + 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], str.SELECT_stat_FROM__Q.sqlite_stat1_WHERE_tbl___q_rowid
mov dword [esp + 4], eax
call fcn.004440e8
test eax, eax
mov edi, eax
je 0x49370d
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.0048b371
test eax, eax
mov dword [ebp - 0x50], 0x64
mov dword [ebp - 0x54], 0
jne 0x4936fd
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.0047778f
cmp eax, 0x64
jne 0x4936f2
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00411cbb
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.00458aaf
mov dword [esp], edi
mov dword [ebp - 0x58], eax
call fcn.0040b268
mov eax, dword [ebp - 0x58]
jmp 0x493720
mov dword [ebp - 0x50], 0x64
mov dword [ebp - 0x54], 0
mov eax, 7
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
cmp edx, 0
jg 0x493739
jl 0x493732
cmp ecx, 0x64
jae 0x493739
mov ecx, 0x64
xor edx, edx
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x34], edx
xor edi, edi
cmp edi, 7
jg 0x4937cc
test eax, eax
jne 0x4937cc
cmp edi, 3
jne 0x49375e
cmp byte [ebx + 0x19], 0
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jne 0x493765
mov eax, dword [edi*4 + 0x4fc880]
mov ecx, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 4], ecx
call fcn.004440e8
mov edx, eax
mov eax, 7
test edx, edx
je 0x4937b8
mov eax, dword [ebp + edi*4 - 0x38]
mov dword [esp + 4], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 5
mov dword [esp + 8], 0xffffffff
mov dword [esp], esi
mov dword [esp + 0x10], eax
mov dword [ebp - 0x50], edx
call fcn.0048b992
mov edx, dword [ebp - 0x50]
mov dword [esp], edx
mov dword [ebp - 0x50], eax
inc edi
call fcn.0040b268
mov eax, dword [ebp - 0x50]
jmp 0x493741
cmp byte [ebx + 0x19], 0
je 0x4938f5
mov eax, dword [ebp + 8]
mov dword [esp], str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], eax
call fcn.004440e8
test eax, eax
mov dword [ebx + 0x40], eax
je 0x49362b
mov dword [esp], esi
call fcn.00436e52
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.UPDATE___w_.__w_rowid_SET
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], eax
call fcn.0041ad88
xor eax, eax
movzx edx, byte [ebx + 0x19]
cmp eax, edx
jge 0x49389c
test eax, eax
je 0x49384f
mov dword [esp + 8], 1
mov dword [esp + 4], 0x4f263e
mov dword [esp], edi
mov dword [ebp - 0x4c], eax
call fcn.0041d93e
mov eax, dword [ebp - 0x4c]
movzx edx, byte [ebx + 0x1a]
cmp eax, edx
lea edx, [eax + 2]
jge 0x49387b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.a_dcoalesce___d_a_d_
mov dword [esp], edi
mov dword [ebp - 0x4c], eax
call fcn.0041ad88
jmp 0x493896
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.a_d__d
mov dword [esp], edi
mov dword [ebp - 0x4c], eax
call fcn.0041ad88
mov eax, dword [ebp - 0x4c]
inc eax
jmp 0x493825
mov dword [esp], edi
mov dword [esp + 4], str._WHERE_rowid_1
call fcn.0041ad88
mov dword [esp], edi
call fcn.0041b064
test eax, eax
mov edi, eax
je 0x49362b
add ebx, 0x70
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 5
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.0048b992
mov dword [esp], edi
mov ebx, eax
call fcn.0040b268
mov eax, ebx
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret