Function at 0x5663a0
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 0x566475
push eax
call fcn.004e3a20
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.004e3c20
mov al, byte [esi + 0x19]
add esp, 0x14
xor ebx, ebx
test al, al
jbe 0x5663fd
push ebx
push str._a_d
push edi
call fcn.004e3c20
xor edx, edx
add esp, 0xc
mov dl, byte [esi + 0x19]
inc ebx
cmp ebx, edx
jl 0x5663e4
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.004e3c20
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.004e3c20
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.004e3c20
push edi
call fcn.004e38a0
mov edi, eax
add esp, 0x38
test edi, edi
jne 0x56644f
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.00515ca0
push edi
mov ebx, eax
call fcn.004e1dc0
add esp, 0x18
test ebx, ebx
jne 0x56661c
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.00566630
add esp, 8
mov ebx, eax
xor eax, eax
mov dword [ebp + 8], eax
jmp 0x5664bb
mov eax, dword [ebp + 8]
test ebx, ebx
jne 0x566529
cmp eax, 3
jne 0x5664d2
mov cl, byte [esi + 0x19]
test cl, cl
je 0x5664d2
mov eax, str.INSERT_INTO__w_.__w_rowid__rowid_nodeno_VALUES__1__2_ON_CONFLICT_rowid_DO_UPDATE_SET_nodenoexcluded.nodeno
jmp 0x5664d9
mov eax, dword [eax*4 + 0x737e38]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push eax
call fcn.004e3af0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x56650f
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.00517bc0
add esp, 0x18
mov ebx, eax
jmp 0x566514
mov ebx, 7
push edi
call fcn.004e1dc0
mov eax, dword [ebp + 8]
add esp, 4
inc eax
cmp eax, 8
mov dword [ebp + 8], eax
jl 0x5664b8
mov al, byte [esi + 0x19]
test al, al
je 0x56661c
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.004e3af0
add esp, 0xc
mov dword [esi + 0x40], eax
test eax, eax
jne 0x56655e
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.004e3a20
mov ecx, dword [ebp + 0x10]
push edi
mov ebx, eax
push ecx
push str.UPDATE___w_.__w_rowid_SET
push ebx
call fcn.004e3c20
mov al, byte [esi + 0x19]
add esp, 0x14
xor edi, edi
test al, al
jbe 0x5665d5
test edi, edi
je 0x566599
push 1
push 0x709efc
push ebx
call fcn.004e37e0
add esp, 0xc
xor edx, edx
mov dl, byte [esi + 0x1a]
cmp edi, edx
jge 0x5665b8
lea eax, [edi + 2]
push edi
push eax
push edi
push str.a_dcoalesce___d_a_d_
push ebx
call fcn.004e3c20
add esp, 0x14
jmp 0x5665cb
lea ecx, [edi + 2]
push ecx
push edi
push str.a_d__d
push ebx
call fcn.004e3c20
add esp, 0x10
xor edx, edx
inc edi
mov dl, byte [esi + 0x19]
cmp edi, edx
jl 0x566585
push str._WHERE_rowid_1
push ebx
call fcn.004e3c20
push ebx
call fcn.004e38a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x5665fd
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.00517bc0
push edi
mov ebx, eax
call fcn.004e1dc0
add esp, 0x1c
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret