Function at 0x100cdb50
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, eax
mov eax, dword [ebp + 8]
push esi
push edi
mov dword [ebx + 0xc], eax
je 0x100cdc5f
push eax
call sym.MyService.dll_sqlite3_str_new
mov ecx, dword [ebp + 0xc]
add esp, 4
mov esi, eax
mov eax, dword [ebp + 0x10]
push eax
push ecx
push str.CREATE_TABLE___w_.__w_rowid__rowid_INTEGER_PRIMARY_KEY_nodeno
push esi
call sym.MyService.dll_sqlite3_str_appendf
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x100cdbac
push edi
push str._a_d
push esi
call sym.MyService.dll_sqlite3_str_appendf
movzx edx, byte [ebx + 0x19]
inc edi
add esp, 0xc
cmp edi, edx
jl 0x100cdb94
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edi
push eax
push str.__CREATE_TABLE___w_.__w_node__nodeno_INTEGER_PRIMARY_KEY_data__
push esi
call sym.MyService.dll_sqlite3_str_appendf
mov ecx, dword [ebp + 0xc]
push edi
push ecx
push str.CREATE_TABLE___w_.__w_parent__nodeno_INTEGER_PRIMARY_KEY_parentnode__
push esi
call sym.MyService.dll_sqlite3_str_appendf
mov edx, dword [ebx + 0x10]
mov eax, dword [ebp + 0xc]
push edx
push edi
push eax
push str.INSERT_INTO___w_.__w_node_VALUES_1_zeroblob__d__
push esi
call sym.MyService.dll_sqlite3_str_appendf
add esp, 0x34
test esi, esi
je 0x100cdc25
cmp esi, 0x1012c7fc
je 0x100cdc25
mov eax, dword [esi + 4]
test eax, eax
je 0x100cdc15
mov ecx, dword [esi + 0x10]
mov byte [eax + ecx], 0
cmp dword [esi + 0xc], 0
jbe 0x100cdc15
test byte [esi + 0x15], 4
jne 0x100cdc15
call fcn.1000cb60
mov edi, eax
jmp 0x100cdc18
mov edi, dword [esi + 4]
push esi
call sym.MyService.dll_sqlite3_free
add esp, 4
test edi, edi
jne 0x100cdc31
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0
push 0
push 0
push edi
push edx
call sym.MyService.dll_sqlite3_exec
add esp, 0x14
push edi
mov esi, eax
call sym.MyService.dll_sqlite3_free
add esp, 4
test esi, esi
je 0x100cdc5c
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea ecx, [ebx + 0x50]
mov dword [ebp - 0x20], ecx
lea edx, [ebx + 0x54]
mov dword [ebp - 0x1c], edx
lea ecx, [ebx + 0x58]
lea edx, [ebx + 0x5c]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edx
lea ecx, [ebx + 0x60]
lea edx, [ebx + 0x64]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
lea ecx, [ebx + 0x68]
lea edx, [ebx + 0x6c]
push eax
mov esi, ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
call fcn.100cd9d0
add esp, 4
mov dword [ebp + 0x14], eax
xor edi, edi
cmp dword [ebp + 0x14], 0
jne 0x100cdd62
cmp edi, 3
jne 0x100cdcb9
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 0x100cdcc0
mov eax, dword [edi*4 + 0x1012e178]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push eax
call sym.MyService.dll_sqlite3_mprintf
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100cdd45
mov eax, dword [ebp + edi*4 - 0x20]
mov ecx, dword [ebp + 8]
push 0
push eax
push 0
push 0x85
push 0xffffffffffffffff
push esi
push ecx
call fcn.10074b10
add esp, 0x1c
cmp dword [0x1012c3e8], 0
mov dword [ebp + 0x14], eax
je 0x100cdd4e
mov eax, dword [0x1013afb8]
test eax, eax
je 0x100cdd13
push eax
call dword [0x1012c438]
add esp, 4
push esi
call dword [0x1012c414]
sub dword [0x1013af50], eax
dec dword [0x1013af74]
add esp, 4
push esi
call dword [0x1012c40c]
mov eax, dword [0x1013afb8]
add esp, 4
test eax, eax
je 0x100cdd58
push eax
call dword [0x1012c440]
jmp 0x100cdd55
mov dword [ebp + 0x14], 7
jmp 0x100cdd58
push esi
call dword [0x1012c40c]
add esp, 4
inc edi
cmp edi, 8
jl 0x100cdc9f
cmp byte [ebx + 0x19], 0
je 0x100cdf3b
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push edi
push edx
push str.SELECT__FROM___w_.__w_rowid__WHERE_rowid_1
call sym.MyService.dll_sqlite3_mprintf
add esp, 0xc
mov dword [ebx + 0x40], eax
test eax, eax
je 0x100cdea8
mov eax, dword [ebp + 8]
push eax
call sym.MyService.dll_sqlite3_str_new
mov ecx, dword [ebp + 0xc]
add esp, 4
push edi
push ecx
mov esi, eax
push str.UPDATE___w_.__w_rowid_SET
push esi
call sym.MyService.dll_sqlite3_str_appendf
add esp, 0x10
xor edi, edi
cmp byte [ebx + 0x19], 0
jbe 0x100cde04
test edi, edi
je 0x100cdde8
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 8]
jb 0x100cddd8
push 0x1011aaa0
mov eax, 1
mov ecx, esi
call fcn.1000ca70
add esp, 4
jmp 0x100cdde8
mov edx, dword [esi + 4]
mov dword [esi + 0x10], eax
mov cl, byte [0x1011aaa0]
mov byte [edx + eax - 1], cl
lea edx, [edi + 2]
push edx
push edi
push str.a_d__d
push esi
call sym.MyService.dll_sqlite3_str_appendf
movzx eax, byte [ebx + 0x19]
inc edi
add esp, 0x10
cmp edi, eax
jl 0x100cddb5
push str._WHERE_rowid_1
push esi
call sym.MyService.dll_sqlite3_str_appendf
add esp, 8
test esi, esi
je 0x100cdea8
cmp esi, 0x1012c7fc
je 0x100cdea8
mov eax, dword [esi + 4]
test eax, eax
je 0x100cde49
mov ecx, dword [esi + 0x10]
mov byte [eax + ecx], 0
cmp dword [esi + 0xc], 0
jbe 0x100cde49
test byte [esi + 0x15], 4
jne 0x100cde49
call fcn.1000cb60
mov edi, eax
jmp 0x100cde4c
mov edi, dword [esi + 4]
cmp dword [0x1012c3e8], 0
je 0x100cde9a
mov eax, dword [0x1013afb8]
test eax, eax
je 0x100cde68
push eax
call dword [0x1012c438]
add esp, 4
push esi
call dword [0x1012c414]
sub dword [0x1013af50], eax
dec dword [0x1013af74]
add esp, 4
push esi
call dword [0x1012c40c]
mov eax, dword [0x1013afb8]
add esp, 4
test eax, eax
je 0x100cdea4
push eax
call dword [0x1012c440]
jmp 0x100cdea1
push esi
call dword [0x1012c40c]
add esp, 4
test edi, edi
jne 0x100cdeb9
mov dword [ebp + 0x14], 7
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0
add ebx, 0x70
push ebx
push 0
push 0x85
push 0xffffffffffffffff
push edi
push edx
call fcn.10074b10
add esp, 0x1c
cmp dword [0x1012c3e8], 0
mov dword [ebp + 0x14], eax
je 0x100cdf31
mov eax, dword [0x1013afb8]
test eax, eax
je 0x100cdef4
push eax
call dword [0x1012c438]
add esp, 4
push edi
call dword [0x1012c414]
sub dword [0x1013af50], eax
dec dword [0x1013af74]
add esp, 4
push edi
call dword [0x1012c40c]
mov eax, dword [0x1013afb8]
add esp, 4
test eax, eax
je 0x100cdf3b
push eax
call dword [0x1012c440]
mov eax, dword [ebp + 0x14]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [0x1012c40c]
add esp, 4
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret