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

Disassembly:
sub esp, 0xa8
mov eax, dword [esp + 0xc8]
push ebx
mov ebx, dword [esp + 0xb0]
push ebp
mov ebp, dword [esp + 0xc8]
push esi
mov esi, dword [ebx]
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
xor eax, eax
push edi
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
cmp dword [esp + 0xdc], eax
je 0x540d0a
cmp dword [edi + 4], eax
jbe 0x540cf8
push str.temporary_trigger_may_not_have_qualified_name
push ebx
call fcn.0054d2c0
jmp 0x540f58
mov eax, dword [esp + 0xc0]
mov edx, 1
mov dword [esp + 0x18], edx
jmp 0x540d32
lea eax, [esp + 0x14]
push eax
push edi
push dword [esp + 0xc8]
push ebx
call fcn.0057aff0
mov edx, eax
add esp, 0x10
mov dword [esp + 0x18], edx
test edx, edx
js 0x540f5b
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xd4]
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x540f5b
cmp byte [esi + 0x57], 0
jne 0x540f5b
cmp byte [esi + 0xb1], 0
je 0x540d7c
cmp edx, 1
je 0x540d7c
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x540d75
push eax
push esi
call fcn.0054aa60
mov ecx, dword [esp + 0xdc]
add esp, 8
mov dword [ecx + 0xc], 0
push ecx
push ebx
call fcn.00578570
add esp, 8
cmp byte [esi + 0xb1], 0
jne 0x540db4
cmp dword [edi + 4], 0
jne 0x540db4
mov edx, dword [esp + 0x18]
test eax, eax
je 0x540db8
mov ecx, dword [esi + 0x10]
mov edi, 1
mov eax, dword [eax + 0x3c]
cmp eax, dword [ecx + 0x1c]
cmove edx, edi
mov dword [esp + 0x18], edx
jmp 0x540db8
mov edx, dword [esp + 0x18]
cmp byte [esi + 0x57], 0
jne 0x540f5b
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x84]
push edi
push str.trigger
push edx
push ebx
push eax
call fcn.00554f20
mov eax, dword [esp + 0xe8]
xorps xmm0, xmm0
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0xa0]
movlpd qword [esp + 0x50], xmm0
push eax
movlpd qword [esp + 0x5c], xmm0
movlpd qword [esp + 0x64], xmm0
movlpd qword [esp + 0x6c], xmm0
movlpd qword [esp + 0x78], xmm0
movlpd qword [esp + 0x80], xmm0
movlpd qword [esp + 0x88], xmm0
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0x98], xmm0
call fcn.0058fbe0
add esp, 0x1c
test eax, eax
jne 0x540f5b
push dword [esp + 0xd4]
push ebx
call fcn.00578570
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x540e74
cmp byte [eax + 0x2b], 1
jne 0x540ea3
push str.cannot_create_triggers_on_virtual_tables
push ebx
call fcn.0054d2c0
add esp, 8
cmp byte [esi + 0xb0], 1
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
jne 0x540e8c
or dword [esi + 0xb4], 1
xor eax, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x540f5b
jmp 0x540f51
test dword [eax + 0x1c], 0x1000
je 0x540ec0
push esi
call fcn.00571390
add esp, 4
test eax, eax
je 0x540ec0
push str.cannot_create_triggers_on_shadow_tables
jmp 0x540e6b
push edi
push esi
call fcn.00566d40
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x540f5b
mov ecx, dword [esp + 0x24]
push dword [ecx]
push str.trigger
push eax
push ebx
call fcn.00546290
add esp, 0x10
test eax, eax
jne 0x540f4d
cmp byte [ebx + 0xdc], 2
jae 0x540fd5
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
add ecx, ecx
push 0
push dword [esp + 0x14]
mov eax, dword [eax + ecx*8 + 0xc]
add eax, 0x28
push eax
call fcn.004fc7d0
add esp, 0xc
cmp dword [eax + 8], 0
je 0x540fd5
cmp dword [esp + 0xe0], 0
jne 0x540f40
push edi
push str.trigger__T_already_exists
push ebx
call fcn.0054d2c0
add esp, 0xc
jmp 0x540f4d
push dword [esp + 0x18]
push ebx
call fcn.00547a60
add esp, 8
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.0054aa60
add esp, 8
push dword [esp + 0xd4]
push esi
call fcn.00577fa0
mov ecx, dword [esp + 0xe0]
add esp, 8
mov eax, ecx
test ebp, ebp
je 0x5413fc
xor edi, edi
mov dword [esp + 0x1c], ecx
cmp dword [ebp], edi
jle 0x540fa9
lea ebx, [ebp + 8]
mov dword [esp + 0x1c], ecx
nop
mov eax, dword [ebx]
test eax, eax
je 0x540fa0
push eax
push esi
call fcn.0054aa60
add esp, 8
inc edi
add ebx, 8
cmp edi, dword [ebp]
jl 0x540f90
cmp ebp, dword [esi + 0x164]
jae 0x54138e
cmp ebp, dword [esi + 0x15c]
jb 0x541375
mov eax, dword [esi + 0x158]
mov dword [ebp], eax
mov dword [esi + 0x158], ebp
jmp 0x5413f8
mov eax, dword [esp + 0x24]
mov edx, 7
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x54104d
mov edi, ecx
mov ecx, str.sqlite_
mov dword [esp + 0x14], ecx
mov al, byte [edi]
dec edx
test al, al
je 0x54101d
movzx ecx, byte [ecx]
movzx eax, al
mov al, byte [eax + 0x612ca8]
cmp al, byte [ecx + 0x612ca8]
mov ecx, dword [esp + 0x14]
jne 0x54101d
inc ecx
inc edi
mov dword [esp + 0x14], ecx
test edx, edx
jg 0x540ff3
dec edx
test edx, edx
js 0x541039
movzx eax, byte [ecx]
movzx ecx, byte [eax + 0x612ca8]
movzx eax, byte [edi]
movzx eax, byte [eax + 0x612ca8]
sub eax, ecx
jne 0x541049
push str.cannot_create_trigger_on_system_table
push ebx
call fcn.0054d2c0
jmp 0x540f4a
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x2b], 2
jne 0x54108e
mov ecx, dword [esp + 0xc8]
cmp ecx, 0x41
je 0x5410b6
mov eax, dword [esp + 0xd4]
mov edx, str.AFTER
add eax, 8
cmp ecx, 0x21
push eax
mov eax, str.BEFORE
cmovne eax, edx
push eax
push str.cannot_create__s_trigger_on_view:__S
push ebx
call fcn.0054d2c0
add esp, 0x10
jmp 0x540e74
cmp dword [esp + 0xc8], 0x41
jne 0x5410b6
mov eax, dword [esp + 0xd4]
add eax, 8
push eax
push str.cannot_create_INSTEAD_OF_trigger_on_table:__S
push ebx
call fcn.0054d2c0
add esp, 0xc
jmp 0x540e74
cmp byte [ebx + 0xdc], 2
jae 0x541160
mov ecx, dword [eax + 0x3c]
mov edi, 0xffff8000
test ecx, ecx
je 0x5410e8
mov eax, dword [esi + 0x10]
xor edi, edi
add eax, 0xc
cmp dword [eax], ecx
je 0x5410e8
nop dword [eax + eax]
lea eax, [eax + 0x10]
inc edi
cmp dword [eax], ecx
jne 0x5410e0
mov ecx, dword [esi + 0x10]
mov eax, edi
add eax, eax
mov edx, 7
cmp dword [esp + 0xdc], 0
mov eax, dword [ecx + eax*8]
mov dword [esp + 0x14], eax
je 0x541108
mov eax, dword [ecx + 0x10]
cmp edi, 1
je 0x541117
cmp dword [esp + 0xdc], 0
je 0x54111c
mov edx, 5
push eax
push dword [esp + 0x30]
push dword [esp + 0x18]
push edx
push ebx
call fcn.00540670
add esp, 0x14
test eax, eax
jne 0x540f4d
push dword [esp + 0x14]
mov ecx, str.sqlite_temp_master
cmp edi, 1
push eax
mov eax, str.sqlite_master
cmove eax, ecx
push eax
push 0x12
push ebx
call fcn.00540670
add esp, 0x14
test eax, eax
jne 0x540f4d
cmp dword [esp + 0xc8], 0x41
mov eax, 0x21
cmovne eax, dword [esp + 0xc8]
mov dword [esp + 0x30], eax
mov eax, 0x24
cmp ax, word [esi + 0x134]
jbe 0x5411b0
cmp dword [esi + 0x130], 0
jne 0x54119b
inc dword [esi + 0x144]
jmp 0x541231
cmp byte [esi + 0x57], 0
je 0x541231
xor eax, eax
mov dword [esp + 0x20], eax
jmp 0x540f4d
mov edi, dword [esi + 0x158]
test edi, edi
je 0x5411d1
mov eax, dword [edi]
mov dword [esi + 0x158], eax
inc dword [esi + 0x140]
mov dword [esp + 0x20], edi
jmp 0x541250
mov edi, dword [esi + 0x154]
test edi, edi
je 0x5411ef
mov eax, dword [edi]
mov dword [esi + 0x154], eax
inc dword [esi + 0x140]
mov dword [esp + 0x20], edi
jmp 0x541250
mov edi, dword [esi + 0x150]
test edi, edi
je 0x54120d
mov eax, dword [edi]
mov dword [esi + 0x150], eax
inc dword [esi + 0x140]
mov dword [esp + 0x20], edi
jmp 0x541250
mov edi, dword [esi + 0x14c]
test edi, edi
je 0x54122b
mov eax, dword [edi]
inc dword [esi + 0x140]
mov dword [esi + 0x14c], eax
mov dword [esp + 0x20], edi
jmp 0x541250
inc dword [esi + 0x148]
push 0
mov eax, esi
push 0x24
push eax
call fcn.004f5d90
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x20], ebx
mov edi, ebx
test ebx, ebx
je 0x54136c
mov edx, dword [esp + 0xd4]
xorps xmm0, xmm0
mov eax, dword [esp + 0x10]
movups xmmword [edi], xmm0
movups xmmword [edi + 0x10], xmm0
mov dword [edi + 0x20], 0
mov dword [edi], eax
mov eax, dword [edx + 0x10]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x54127d
xor ecx, ecx
jmp 0x5412c4
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x541282
sub ecx, edx
push 0
lea eax, [ecx + 1]
push eax
push esi
mov dword [esp + 0x38], eax
call fcn.0054aba0
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x5412bd
push dword [esp + 0x2c]
push dword [esp + 0x18]
push ecx
call fcn.00430da0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [esp + 0xd4]
shl dword [esp + 0x18], 4
mov ebx, dword [esp + 0x18]
cmp dword [esp + 0x30], 0x21
mov dword [edi + 4], ecx
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 0xc]
mov ebx, dword [esp + 0xbc]
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x3c]
mov dword [edi + 0x18], eax
mov al, byte [esp + 0xcc]
mov byte [edi + 8], al
setne al
inc al
mov byte [edi + 9], al
cmp byte [ebx + 0xdc], 2
jb 0x541322
push dword [edx + 0x10]
push ecx
push ebx
call fcn.00572150
add esp, 0xc
mov dword [esp + 0x1c], 0
jmp 0x54134d
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x54133e
push 0
push 1
push eax
push esi
call fcn.004fa110
add esp, 0x10
mov dword [esp + 0x28], eax
jmp 0x541346
mov dword [esp + 0x28], 0
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0x28]
mov dword [edi + 0xc], eax
push edx
mov dword [edi + 0x10], ebp
push esi
mov dword [ebx + 0x100], edi
call fcn.00577fa0
add esp, 8
jmp 0x5413f8
mov dword [esp + 0x20], ebx
jmp 0x540f4d
cmp ebp, dword [esi + 0x160]
jb 0x54138e
mov eax, dword [esi + 0x150]
mov dword [ebp], eax
mov dword [esi + 0x150], ebp
jmp 0x5413f8
cmp dword [esi + 0x210], 0
je 0x5413a3
push ebp
push esi
call fcn.00528dd0
add esp, 8
jmp 0x5413f8
cmp dword [0x645f38], 0
je 0x5413ee
mov eax, dword [0x64de48]
test eax, eax
je 0x5413bf
push eax
call dword [0x645f88]
add esp, 4
push ebp
call dword [0x645f64]
sub dword [0x64dde8], eax
dec dword [0x64de0c]
push ebp
call dword [0x645f5c]
mov eax, dword [0x64de48]
add esp, 8
test eax, eax
je 0x5413f8
push eax
call dword [0x645f90]
jmp 0x5413f5
push ebp
call dword [0x645f5c]
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x54140a
push eax
push esi
call fcn.005514d0
add esp, 8
mov eax, dword [esp + 0xbc]
cmp dword [eax + 0x100], 0
jne 0x541479
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x541479
cmp byte [ebx + 0xa], 0
jne 0x541479
push dword [ebx + 0x1c]
push esi
call fcn.0054be70
mov eax, dword [ebx]
add esp, 8
test eax, eax
je 0x541444
push eax
push esi
call fcn.0054aa60
add esp, 8
mov eax, dword [ebx + 4]
test eax, eax
je 0x541455
push eax
push esi
call fcn.0054aa60
add esp, 8
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x541466
push eax
push esi
call fcn.005514d0
add esp, 8
push dword [ebx + 0x10]
push esi
call fcn.00561f10
push ebx
push esi
call fcn.0054aa60
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa8
ret