Function at 0x5874d4
Capabilities:
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x88
cmp dword [ebp + 0x78], 0
mov eax, dword [ebp + 0x70]
push edi
mov edi, dword [eax]
mov dword [ebp + 0x64], edi
jne 0x5874f8
cmp dword [ebp + 0x7c], 0
je 0x5877a8
cmp byte [edi + 0x1e], 0
jne 0x5877a8
push ebx
mov ebx, dword [eax + 0x200]
test ebx, ebx
je 0x5877a7
push esi
mov esi, dword [ebx + 0x44]
mov ecx, edi
call fcn.005577f7
xor esi, esi
mov dword [ebp + 0x60], eax
cmp dword [ebx + 0x2c], esi
je 0x58757a
push 0x24
lea eax, [ebp + 0x30]
push esi
push eax
call fcn.00596530
push 0x40
lea eax, [ebp - 0x20]
push esi
push eax
call fcn.00596530
mov edi, dword [ebx + 0x2c]
or dword [ebp], 0xffffffff
xor eax, eax
inc eax
mov word [ebp - 0x20], ax
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp + 0x30], eax
lea eax, [ebp - 0x20]
add esp, 0x18
lea esi, [ebp + 0x30]
mov dword [ebp - 0xc], ebx
mov dword [ebp + 0x34], eax
mov byte [ebp + 0x46], 1
call fcn.005681ea
test eax, eax
jne 0x5877a6
mov edi, dword [ebp + 0x64]
cmp byte [edi + 0x7c], 0
je 0x587590
mov eax, dword [edi + 0x78]
mov dword [ebx + 0x14], eax
cmp byte [edi + 0x7c], 0
jne 0x587742
mov edi, dword [ebp + 0x70]
call fcn.0056287c
mov edi, eax
xor esi, esi
mov dword [ebp + 0x54], edi
cmp edi, esi
je 0x5877a6
push esi
push 0x2b
pop eax
mov ecx, edi
call fcn.0055c33b
pop ecx
cmp dword [ebx + 0x1c], esi
jne 0x5875c6
mov dword [ebp + 0x5c], str.table
mov edx, str.TABLE
jmp 0x5875d2
mov dword [ebp + 0x5c], str.view
mov edx, str.VIEW
cmp dword [ebp + 0x7c], esi
je 0x58766c
push dword [ebp + 0x60]
mov esi, dword [ebp + 0x70]
push dword [esi + 0x19c]
mov ecx, edi
push 1
push 0x27
pop eax
call fcn.0055c2b7
mov dl, 1
mov ecx, edi
call fcn.00555aea
push 1
push 8
lea eax, [ebp + 0x20]
mov dword [esi + 0x44], 2
call fcn.0055787e
push eax
push dword [ebp + 0x7c]
push esi
call fcn.005851de
push 1
push 0x2b
pop eax
mov ecx, edi
call fcn.0055c33b
xor edi, edi
add esp, 0x24
cmp dword [esi + 0x40], edi
jne 0x58765e
mov eax, dword [ebp + 0x7c]
push esi
call fcn.005872d0
pop ecx
cmp eax, edi
je 0x5877a6
mov ecx, dword [eax + 8]
mov dword [ebx + 8], ecx
mov ecx, dword [eax + 0xc]
push eax
push dword [ebp + 0x64]
mov dword [ebx + 0xc], ecx
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
call fcn.00561529
pop ecx
pop ecx
push dword [ebp + 0x64]
call fcn.0055e439
mov edi, dword [ebp + 0x70]
pop ecx
jmp 0x587690
mov edi, dword [ebp + 0x70]
mov ecx, dword [edi + 0x1ec]
mov eax, dword [ebp + 0x78]
mov eax, dword [eax]
mov esi, dword [ebp + 0x64]
sub eax, ecx
push ecx
inc eax
push eax
push edx
push str.CREATE__s__.s
call fcn.00559ec3
add esp, 0x10
mov ecx, dword [ebp + 0x60]
mov esi, eax
mov edx, str.sqlite_temp_master
cmp ecx, 1
je 0x5876a4
mov edx, str.sqlite_master
push dword [edi + 0x198]
mov eax, dword [ebx]
push esi
push dword [edi + 0x19c]
shl ecx, 4
push eax
push eax
push dword [ebp + 0x5c]
mov eax, dword [ebp + 0x64]
mov eax, dword [eax + 8]
push edx
push dword [ecx + eax]
mov dword [ebp + 0x58], ecx
push str.UPDATE__Q._s_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
call fcn.0055dfe7
push esi
push dword [ebp + 0x64]
call fcn.00551521
mov edi, dword [ebp + 0x70]
push dword [ebp + 0x60]
mov esi, edi
call fcn.0055e35e
add esp, 0x30
test byte [ebx + 0x22], 8
je 0x587711
mov eax, dword [ebp + 0x64]
mov eax, dword [eax + 8]
add eax, dword [ebp + 0x58]
mov ecx, dword [eax + 0xc]
cmp dword [ecx + 0x48], 0
jne 0x587711
push dword [eax]
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
call fcn.0055dfe7
pop ecx
pop ecx
mov esi, dword [ebp + 0x64]
push 0xffffffffffffffff
push dword [ebx]
push str.tbl_name_q
call fcn.00559ec3
pop ecx
pop ecx
push eax
push 0
push 0
push dword [ebp + 0x60]
push dword [ebp + 0x54]
push 0x63
pop eax
call fcn.00560b2c
mov edi, esi
add esp, 0x18
cmp byte [edi + 0x7c], 0
je 0x5877a6
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x44]
push ebx
call fcn.00551700
push eax
lea eax, [edx + 8]
mov edi, ecx
call fcn.0055a24e
pop ecx
test eax, eax
mov eax, dword [ebp + 0x64]
pop ecx
je 0x587767
mov byte [eax + 0x1e], 1
jmp 0x5877a6
mov ecx, dword [ebp + 0x70]
xor edx, edx
mov dword [ecx + 0x200], edx
inc dword [eax + 0x28]
or dword [eax + 0xc], 0x200
cmp dword [ebx + 0x1c], edx
jne 0x5877a6
mov eax, dword [ebp + 0x74]
mov ecx, dword [ecx + 0x1ec]
cmp dword [eax], edx
jne 0x587794
mov eax, dword [ebp + 0x78]
mov dword [ebp + 0x74], eax
mov eax, dword [ebp + 0x74]
mov edx, dword [eax]
sub edx, ecx
call fcn.00551678
add eax, 0xd
mov dword [ebx + 0x30], eax
pop esi
pop ebx
pop edi
add ebp, 0x68
leave
ret