Function at 0x4f40c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test ecx, ecx
mov dword [esi + 0xc], eax
je 0x4f4195
push eax
call fcn.00471110
mov ecx, dword [ebp + 0x10]
mov edi, eax
mov eax, dword [ebp + 0x14]
push eax
push ecx
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push edi
call fcn.00471310
mov al, byte [esi + 0x19]
add esp, 0x14
xor ebx, ebx
test al, al
jbe 0x4f411d
push ebx
push str._a_d
push edi
call fcn.00471310
xor edx, edx
add esp, 0xc
mov dl, byte [esi + 0x19]
inc ebx
cmp ebx, edx
jl 0x4f4104
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push ebx
push eax
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push edi
call fcn.00471310
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push edi
call fcn.00471310
mov edx, dword [esi + 0x10]
mov eax, dword [ebp + 0x10]
push edx
push ebx
push eax
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push edi
call fcn.00471310
push edi
call fcn.00470f90
mov edi, eax
add esp, 0x38
test edi, edi
jne 0x4f416f
pop edi
pop esi
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
push 0
push 0
push 0
push edi
push ecx
call fcn.004a32b0
push edi
mov ebx, eax
call fcn.0046f4b0
add esp, 0x18
test ebx, ebx
jne 0x4f433c
mov eax, dword [ebp + 0xc]
lea edx, [esi + 0x50]
lea ecx, [esi + 0x54]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
lea edx, [esi + 0x58]
lea ecx, [esi + 0x5c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
lea edx, [esi + 0x60]
lea ecx, [esi + 0x64]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
lea edx, [esi + 0x68]
lea ecx, [esi + 0x6c]
push esi
push eax
mov dword [ebp - 8], edx
mov dword [ebp - 4], ecx
call fcn.004f4350
add esp, 8
mov ebx, eax
xor eax, eax
mov dword [ebp + 8], eax
jmp 0x4f41db
mov eax, dword [ebp + 8]
test ebx, ebx
jne 0x4f4249
cmp eax, 3
jne 0x4f41f2
mov cl, byte [esi + 0x19]
test cl, cl
je 0x4f41f2
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jmp 0x4f41f9
mov eax, dword [eax*4 + 0x8d9f18]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push eax
call fcn.004711e0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x4f422f
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push 0
mov eax, dword [ebp + edx*4 - 0x20]
push eax
push 5
push 0xffffffffffffffff
push edi
push ecx
call fcn.004a51d0
add esp, 0x18
mov ebx, eax
jmp 0x4f4234
mov ebx, 7
push edi
call fcn.0046f4b0
mov eax, dword [ebp + 8]
add esp, 4
inc eax
cmp eax, 8
mov dword [ebp + 8], eax
jl 0x4f41d8
mov al, byte [esi + 0x19]
test al, al
je 0x4f433c
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push edi
push edx
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call fcn.004711e0
add esp, 0xc
mov dword [esi + 0x40], eax
test eax, eax
jne 0x4f427e
mov ebx, 7
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
push eax
call fcn.00471110
mov ecx, dword [ebp + 0x10]
push edi
mov ebx, eax
push ecx
push str.UPDATE___w_.__w_rowid_SET
push ebx
call fcn.00471310
mov al, byte [esi + 0x19]
add esp, 0x14
xor edi, edi
test al, al
jbe 0x4f42f5
test edi, edi
je 0x4f42b9
push 1
push 0x8b63dc
push ebx
call fcn.00470ed0
add esp, 0xc
xor edx, edx
mov dl, byte [esi + 0x1a]
cmp edi, edx
jge 0x4f42d8
lea eax, [edi + 2]
push edi
push eax
push edi
push str.a_dcoalesce___d_a_d_
push ebx
call fcn.00471310
add esp, 0x14
jmp 0x4f42eb
lea ecx, [edi + 2]
push ecx
push edi
push str.a_d__d
push ebx
call fcn.00471310
add esp, 0x10
xor edx, edx
inc edi
mov dl, byte [esi + 0x19]
cmp edi, edx
jl 0x4f42a5
push str._WHERE_rowid_1
push ebx
call fcn.00471310
push ebx
call fcn.00470f90
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4f431d
mov ebx, 7
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
add esi, 0x70
push 0
push esi
push 5
push 0xffffffffffffffff
push edi
push eax
call fcn.004a51d0
push edi
mov ebx, eax
call fcn.0046f4b0
add esp, 0x1c
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret