Function at 0x589460
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x9c
push ebx
push ebp
mov ebp, dword [esp + 0xa8]
cmp dword [ebp + 0x1c8], 0
push esi
mov esi, dword [ebp]
push edi
mov ebx, eax
mov edi, ecx
jle 0x5894b4
push str.parameters_are_not_allowed_in_views
mov edi, ebp
call fcn.005442b0
add esp, 4
test ebx, ebx
je 0x589917
push ebx
push esi
call fcn.00539b10
push ebx
push esi
call fcn.00531d40
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0xbc]
mov edx, dword [esp + 0xb8]
push eax
push 0
push 1
push ecx
push ebp
mov eax, edi
call fcn.0057d850
mov eax, dword [ebp + 0x200]
add esp, 0x14
test eax, eax
mov dword [esp + 0x18], eax
je 0x589490
mov edx, dword [esp + 0xb8]
push ebp
lea ecx, [esp + 0x24]
mov eax, edi
call fcn.00546e10
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + 0x40]
add esp, 4
test edi, edi
je 0x589569
mov edx, dword [esi + 4]
xor eax, eax
test edx, edx
jle 0x58952f
mov ecx, dword [esi + 8]
add ecx, 0xc
cmp dword [ecx], edi
je 0x589526
add eax, 1
add ecx, 0x10
cmp eax, edx
jl 0x589518
test eax, eax
jl 0x589569
cmp eax, 1
je 0x589569
mov ecx, dword [ebp]
mov dword [esp + 0x5c], ebp
mov edx, dword [ecx + 8]
mov ecx, dword [esp + 0x20]
shl eax, 4
mov eax, dword [eax + edx]
lea edx, [esp + 0x5c]
push ebx
push edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], str.view
mov dword [esp + 0x70], ecx
call fcn.005467f0
add esp, 8
test eax, eax
jne 0x589490
push 1
push ebx
push esi
call fcn.00546170
mov edi, dword [esp + 0x24]
add esp, 0xc
test ebx, ebx
mov dword [edi + 0x18], eax
je 0x589591
push ebx
push esi
call fcn.00539b10
push ebx
push esi
call fcn.00531d40
add esp, 0x10
cmp byte [esi + 0x1e], 0
jne 0x589917
cmp byte [esi + 0x7c], 0
jne 0x5895ab
push edi
push ebp
call fcn.00583900
add esp, 8
mov eax, dword [ebp + 0x1f4]
mov cl, byte [eax]
test cl, cl
mov edx, dword [ebp + 0x1f8]
je 0x5895c4
cmp cl, 0x3b
je 0x5895c4
add eax, edx
mov ecx, dword [esp + 0xb4]
mov ecx, dword [ecx]
sub eax, ecx
test eax, eax
jle 0x5895f5
jmp 0x5895e0
movzx edx, byte [ecx + eax - 1]
test byte [edx + 0x5f8c18], 1
je 0x5895f5
sub eax, 1
test eax, eax
jg 0x5895e0
mov edi, dword [ebp]
cmp byte [edi + 0x1e], 0
lea eax, [ecx + eax - 1]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], edi
jne 0x589917
mov ebx, dword [ebp + 0x200]
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x589917
mov esi, dword [ebx + 0x40]
mov ecx, edi
call fcn.00539ae0
mov esi, dword [ebx + 0x28]
test esi, esi
mov dword [esp + 0x20], eax
je 0x5896c2
xor eax, eax
push 0x40
push eax
lea ecx, [esp + 0x74]
push ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
call fcn.005b4520
mov edx, dword [ebx]
mov dword [esp + 0x8c], ebx
lea eax, [esp + 0x78]
mov ebx, esi
add esp, 0xc
lea esi, [esp + 0x38]
mov word [esp + 0x6c], 1
mov dword [esp + 0x78], edx
mov dword [esp + 0x8c], 0xffffffff
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], eax
mov byte [esp + 0x4e], 1
call fcn.00554790
test eax, eax
jne 0x589917
mov ebx, dword [esp + 0x14]
cmp byte [edi + 0x7c], 0
je 0x5896d8
mov ecx, dword [edi + 0x78]
mov dword [ebx + 0x14], ecx
cmp byte [edi + 0x7c], 0
jne 0x5898a7
mov edi, ebp
call fcn.00549210
mov edi, eax
test edi, edi
je 0x589917
push 0
push 0x2b
call fcn.0053f710
mov ebx, dword [esp + 0x1c]
add esp, 8
cmp dword [ebx + 0x18], 0
jne 0x58970e
mov dword [esp + 0x24], str.table
mov edx, str.TABLE
jmp 0x58971b
mov dword [esp + 0x24], str.view
mov edx, str.VIEW
mov ecx, dword [ebp + 0x1ec]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
sub eax, ecx
push ecx
add eax, 1
push eax
push edx
push str.CREATE__s__.s
call fcn.00544050
mov esi, dword [esp + 0x30]
add esp, 0x10
cmp esi, 1
mov edx, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], str.sqlite_temp_master
je 0x58975d
mov dword [esp + 0x1c], str.sqlite_master
mov ecx, dword [ebx]
mov ebx, dword [ebp + 0x198]
push ebx
push edx
mov edx, dword [ebp + 0x19c]
push edx
mov edx, dword [esp + 0x28]
push ecx
push ecx
mov ecx, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [ecx + 8]
mov eax, esi
shl eax, 4
mov dword [esp + 0x50], eax
mov eax, dword [eax + edx]
push eax
push str.UPDATE__Q._s_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
mov ebx, ebp
call fcn.00546b60
mov ecx, dword [esp + 0x54]
mov ebx, dword [esp + 0x34]
push ecx
push ebx
call fcn.00531d40
push esi
mov esi, ebp
call fcn.00541180
mov esi, dword [esp + 0x44]
add esp, 0x30
test byte [esi + 0x1e], 8
je 0x5897e1
mov eax, dword [ebx + 8]
add eax, dword [esp + 0x34]
xor ebx, ebx
mov edx, dword [eax + 0xc]
cmp dword [edx + 0x44], ebx
jne 0x5897e3
mov eax, dword [eax]
push eax
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
mov ebx, ebp
call fcn.00546b60
add esp, 8
xor ebx, ebx
mov ecx, dword [esi]
mov esi, dword [esp + 0x10]
push ecx
push str.tbl_name_q
call fcn.00544050
mov esi, dword [edi + 0xc]
add esp, 8
cmp dword [edi + 0x10], esi
mov dword [esp + 0x1c], eax
jg 0x589813
call fcn.0053f5e0
test eax, eax
je 0x589813
mov eax, 1
jmp 0x58983e
mov eax, dword [edi + 0x14]
add dword [edi + 0xc], 1
mov ecx, dword [esp + 0x20]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov byte [eax], 0x63
mov byte [eax + 3], bl
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov byte [eax + 1], bl
mov byte [edi + 0x62], bl
mov eax, esi
mov esi, dword [edi + 0x14]
cmp esi, ebx
mov edx, dword [edi]
je 0x58988b
cmp byte [edx + 0x1e], bl
jne 0x58988b
cmp eax, ebx
jge 0x589856
mov eax, dword [edi + 0xc]
sub eax, 1
lea eax, [eax + eax*4]
mov ecx, dword [esi + eax*4 + 0x10]
lea esi, [esi + eax*4]
movsx eax, byte [esi + 1]
mov edi, edx
call fcn.0053f8d0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
mov edi, dword [esp + 0x10]
mov dword [esi + 0x10], ebx
jne 0x589882
mov dword [esi + 0x10], ebx
mov byte [esi + 1], bl
jmp 0x58989d
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xff
jmp 0x58989d
mov ecx, dword [esp + 0x1c]
or eax, 0xffffffff
mov edi, edx
call fcn.0053f8d0
mov edi, dword [esp + 0x10]
cmp byte [edi + 0x7c], 0
mov ebx, dword [esp + 0x14]
je 0x589917
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x40]
push ebx
call fcn.00531f50
push ecx
lea ecx, [edx + 4]
call fcn.0053cfe0
add esp, 8
test eax, eax
je 0x5898d1
mov byte [edi + 0x1e], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret
mov dword [ebp + 0x200], 0
add dword [edi + 0x28], 1
or dword [edi + 0xc], 0x200
cmp dword [ebx + 0x18], 0
jne 0x589917
mov ecx, dword [esp + 0x18]
cmp dword [ecx], ecx
mov ebp, dword [ebp + 0x1ec]
jne 0x589902
lea edx, [esp + 0x28]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
sub edx, ebp
mov ecx, ebp
call fcn.00531e80
add eax, 0xd
mov dword [ebx + 0x2c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret