Function at 0x596020
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 0x596074
push str.parameters_are_not_allowed_in_views
mov edi, ebp
call fcn.00550e70
add esp, 4
test ebx, ebx
je 0x5964d7
push ebx
push esi
call fcn.005466e0
push ebx
push esi
call fcn.0053e910
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.0058a410
mov eax, dword [ebp + 0x200]
add esp, 0x14
test eax, eax
mov dword [esp + 0x18], eax
je 0x596050
mov edx, dword [esp + 0xb8]
push ebp
lea ecx, [esp + 0x24]
mov eax, edi
call fcn.005539d0
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + 0x40]
add esp, 4
test edi, edi
je 0x596129
mov edx, dword [esi + 4]
xor eax, eax
test edx, edx
jle 0x5960ef
mov ecx, dword [esi + 8]
add ecx, 0xc
cmp dword [ecx], edi
je 0x5960e6
add eax, 1
add ecx, 0x10
cmp eax, edx
jl 0x5960d8
test eax, eax
jl 0x596129
cmp eax, 1
je 0x596129
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.005533b0
add esp, 8
test eax, eax
jne 0x596050
push 1
push ebx
push esi
call fcn.00552d30
mov edi, dword [esp + 0x24]
add esp, 0xc
test ebx, ebx
mov dword [edi + 0x18], eax
je 0x596151
push ebx
push esi
call fcn.005466e0
push ebx
push esi
call fcn.0053e910
add esp, 0x10
cmp byte [esi + 0x1e], 0
jne 0x5964d7
cmp byte [esi + 0x7c], 0
jne 0x59616b
push edi
push ebp
call fcn.005904c0
add esp, 8
mov eax, dword [ebp + 0x1f4]
mov cl, byte [eax]
test cl, cl
mov edx, dword [ebp + 0x1f8]
je 0x596184
cmp cl, 0x3b
je 0x596184
add eax, edx
mov ecx, dword [esp + 0xb4]
mov ecx, dword [ecx]
sub eax, ecx
test eax, eax
jle 0x5961b5
jmp 0x5961a0
movzx edx, byte [ecx + eax - 1]
test byte [edx + 0x606df8], 1
je 0x5961b5
sub eax, 1
test eax, eax
jg 0x5961a0
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 0x5964d7
mov ebx, dword [ebp + 0x200]
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x5964d7
mov esi, dword [ebx + 0x40]
mov ecx, edi
call fcn.005466b0
mov esi, dword [ebx + 0x28]
test esi, esi
mov dword [esp + 0x20], eax
je 0x596282
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.005c0cf0
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.00561350
test eax, eax
jne 0x5964d7
mov ebx, dword [esp + 0x14]
cmp byte [edi + 0x7c], 0
je 0x596298
mov ecx, dword [edi + 0x78]
mov dword [ebx + 0x14], ecx
cmp byte [edi + 0x7c], 0
jne 0x596467
mov edi, ebp
call fcn.00555dd0
mov edi, eax
test edi, edi
je 0x5964d7
push 0
push 0x2b
call fcn.0054c2d0
mov ebx, dword [esp + 0x1c]
add esp, 8
cmp dword [ebx + 0x18], 0
jne 0x5962ce
mov dword [esp + 0x24], str.table
mov edx, str.TABLE
jmp 0x5962db
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.00550c10
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 0x59631d
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.00553720
mov ecx, dword [esp + 0x54]
mov ebx, dword [esp + 0x34]
push ecx
push ebx
call fcn.0053e910
push esi
mov esi, ebp
call fcn.0054dd40
mov esi, dword [esp + 0x44]
add esp, 0x30
test byte [esi + 0x1e], 8
je 0x5963a1
mov eax, dword [ebx + 8]
add eax, dword [esp + 0x34]
xor ebx, ebx
mov edx, dword [eax + 0xc]
cmp dword [edx + 0x44], ebx
jne 0x5963a3
mov eax, dword [eax]
push eax
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
mov ebx, ebp
call fcn.00553720
add esp, 8
xor ebx, ebx
mov ecx, dword [esi]
mov esi, dword [esp + 0x10]
push ecx
push str.tbl_name_q
call fcn.00550c10
mov esi, dword [edi + 0xc]
add esp, 8
cmp dword [edi + 0x10], esi
mov dword [esp + 0x1c], eax
jg 0x5963d3
call fcn.0054c1a0
test eax, eax
je 0x5963d3
mov eax, 1
jmp 0x5963fe
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 0x59644b
cmp byte [edx + 0x1e], bl
jne 0x59644b
cmp eax, ebx
jge 0x596416
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.0054c490
mov eax, dword [esp + 0x1c]
cmp eax, ebx
mov edi, dword [esp + 0x10]
mov dword [esi + 0x10], ebx
jne 0x596442
mov dword [esi + 0x10], ebx
mov byte [esi + 1], bl
jmp 0x59645d
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xff
jmp 0x59645d
mov ecx, dword [esp + 0x1c]
or eax, 0xffffffff
mov edi, edx
call fcn.0054c490
mov edi, dword [esp + 0x10]
cmp byte [edi + 0x7c], 0
mov ebx, dword [esp + 0x14]
je 0x5964d7
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x40]
push ebx
call fcn.0053eb20
push ecx
lea ecx, [edx + 4]
call fcn.00549ba0
add esp, 8
test eax, eax
je 0x596491
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 0x5964d7
mov ecx, dword [esp + 0x18]
cmp dword [ecx], ecx
mov ebp, dword [ebp + 0x1ec]
jne 0x5964c2
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.0053ea50
add eax, 0xd
mov dword [ebx + 0x2c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret