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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
mov ebx, ecx
mov dword [esp + 0x1c], edx
push esi
push edi
mov dword [esp + 0xc], ebx
cmp dword [ebx + 0x24], 0
mov esi, dword [ebx + 0xfc]
mov edi, dword [ebx]
mov dword [ebx + 0xfc], 0
jne 0x491578
test esi, esi
je 0x4915c2
cmp dword [esi + 0x14], 0
mov eax, dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0xffff8000
je 0x4911b8
mov eax, dword [edi + 0x10]
xor ecx, ecx
mov ebx, dword [esi + 0x14]
add eax, 0xc
mov dword [esp + 0x10], ecx
cmp dword [eax], ebx
mov ebx, dword [esp + 0xc]
je 0x4911b8
mov ebx, dword [esi + 0x14]
lea eax, [eax + 0x10]
inc ecx
cmp dword [eax], ebx
jne 0x4911a8
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x10], ecx
mov dword [esi + 0x1c], edx
test edx, edx
je 0x4911ce
nop
mov dword [edx + 4], esi
mov edx, dword [edx + 0x28]
test edx, edx
jne 0x4911c0
mov dword [esp + 0x24], edx
mov ecx, dword [esi]
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x4911ef
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4911e0
sub ecx, edx
and ecx, 0x3fffffff
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebx]
shl eax, 4
cmp dword [esp + 0x10], 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], ebx
mov eax, dword [ecx + 0x10]
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + eax]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 0x10]
mov ecx, ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [ecx + eax + 0xc]
sete byte [esp + 0x58]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x64], eax
xor eax, eax
mov word [esp + 0x4c], ax
lea eax, [esp + 0x34]
mov dword [esp + 0x60], str.trigger
mov ecx, eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x45f160
mov dword [esp + 0x40], 0x45f1b0
mov dword [esp + 0x44], fcn.0040dd00
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], eax
mov edx, dword [esi + 0x1c]
call fcn.0045f2e0
test eax, eax
jne 0x49157c
mov edx, dword [esi + 0xc]
test edx, edx
je 0x49129a
lea ecx, [esp + 0x38]
call fcn.0044a1e0
test eax, eax
jne 0x49157c
cmp byte [ebx + 0xd8], 2
jb 0x4912b0
mov dword [ebx + 0xfc], esi
xor esi, esi
jmp 0x49150d
cmp byte [edi + 0xb1], 0
jne 0x491516
mov eax, dword [edi + 0x20]
and eax, 0x10000000
or eax, 0
je 0x491367
cmp dword [edi + 0x194], 0
jne 0x491367
cmp dword [edi + 0xc8], 0
jne 0x491367
cmp dword [edi + 0x180], 0
jle 0x4912fa
cmp dword [edi + 0x198], 0
je 0x491367
mov ebx, dword [esi + 0x1c]
test ebx, ebx
je 0x491363
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x49135c
push 0x5f
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x49135c
mov edx, dword [esp + 0x1c]
mov ecx, edi
push 0
mov byte [eax], 0
call fcn.00460060
mov edx, eax
add esp, 4
mov eax, dword [esp + 0x20]
mov byte [eax], 0x5f
test edx, edx
je 0x49135c
cmp byte [edx + 0x2b], 1
jne 0x49135c
push dword [esp + 0x1c]
mov ecx, edi
call fcn.00463760
add esp, 4
test eax, eax
jne 0x491435
mov ebx, dword [ebx + 0x28]
test ebx, ebx
jne 0x491301
mov ebx, dword [esp + 0xc]
mov eax, dword [ebx + 8]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x491396
cmp dword [ebx + 0x78], eax
jne 0x491383
mov eax, dword [ebx]
test byte [eax + 0x50], 8
jne 0x491383
mov byte [ebx + 0x17], 1
mov ecx, ebx
call fcn.00436f50
mov dword [esp + 0x20], eax
test eax, eax
je 0x49157c
mov eax, dword [ebx + 0x78]
mov edx, ebx
mov ecx, dword [esp + 0x10]
test eax, eax
mov ebx, dword [esp + 0xc]
cmovne edx, eax
mov dword [esp + 0x28], edx
mov eax, dword [edx + 0x58]
mov dword [esp + 0x1c], eax
mov eax, 1
shl eax, cl
test dword [esp + 0x1c], eax
jne 0x4913de
mov eax, dword [esp + 0x1c]
bts eax, ecx
mov dword [edx + 0x58], eax
cmp ecx, 1
jne 0x4913de
mov ecx, edx
call fcn.004685d0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x54]
bts eax, ecx
mov dword [edx + 0x54], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
test eax, eax
je 0x491450
xor eax, eax
add ecx, 1
adc eax, eax
push eax
push ecx
mov ecx, edi
call fcn.00413890
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
je 0x491456
push dword [esp + 0x1c]
push dword [esp + 0x2c]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x18]
add esp, 0xc
mov ecx, dword [esp + 0x1c]
mov byte [ecx + eax], 0
jmp 0x491456
push dword [ebx + 0xc]
push dword [esi]
push str.trigger___s__may_not_write_to_shadow_table___s_
push dword [esp + 0x18]
call fcn.00417860
add esp, 0x10
jmp 0x49157c
xor eax, eax
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x14]
push eax
push dword [esi + 4]
mov eax, dword [edi + 0x10]
push dword [esp + 0x20]
push dword [eax + ecx]
push str.INSERT_INTO__Q.sqlite_master_VALUES_trigger__Q__Q_0_CREATE_TRIGGER__q_
push ebx
call fcn.0045ff40
push dword [esp + 0x24]
push edi
call fcn.00413560
mov eax, dword [ebx]
add esp, 0x20
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x28], ecx
mov eax, dword [eax + 0x10]
mov ebx, dword [ecx + 0x6c]
mov eax, dword [eax + edx + 0xc]
mov edx, dword [eax]
inc edx
cmp dword [ecx + 0x70], ebx
jg 0x4914b6
mov ebx, dword [esp + 0x10]
push edx
push 1
push ebx
mov edx, 0x64
call fcn.00437140
add esp, 0xc
jmp 0x4914e9
lea eax, [ebx + 1]
mov dword [ecx + 0x6c], eax
lea ecx, [ebx + ebx*4]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x10]
mov eax, dword [eax + 0x68]
mov dword [eax + ecx*4], 0x64
mov dword [eax + ecx*4 + 4], ebx
mov dword [eax + ecx*4 + 8], 1
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
push 0
push ecx
push dword [esp + 0x20]
push str.typetrigger_AND_name_q
push edi
call fcn.00416840
mov ecx, dword [esp + 0x34]
add esp, 0x10
mov edx, ebx
push eax
call fcn.00437610
add esp, 8
cmp byte [edi + 0xb1], 0
je 0x491578
mov eax, dword [edi + 0x10]
mov ebx, esi
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push esi
mov ecx, dword [eax + ecx + 0xc]
add ecx, 0x28
call fcn.00418f90
mov esi, eax
add esp, 4
test esi, esi
je 0x491542
mov ecx, edi
call fcn.00413c70
jmp 0x49157c
mov ecx, dword [ebx + 0x18]
cmp dword [ebx + 0x14], ecx
jne 0x4915c2
mov edx, dword [ebx + 4]
add ecx, 8
push 0
call fcn.00418ee0
mov edx, dword [esp + 0x28]
add esp, 4
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 0x38]
mov dword [ebx + 0x20], eax
mov dword [ecx + 0x38], ebx
mov ecx, edi
call fcn.00490830
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4915c2
cmp byte [esi + 0xa], 0
jne 0x4915c2
mov edx, dword [esi + 0x1c]
mov ecx, edi
call fcn.00490830
push dword [esi]
push edi
call fcn.00413560
push dword [esi + 4]
push edi
call fcn.00413560
mov edx, dword [esi + 0xc]
add esp, 0x10
test edx, edx
je 0x4915ae
mov ecx, edi
call fcn.0044ed80
mov edx, dword [esi + 0x10]
mov ecx, edi
call fcn.00467770
push esi
push edi
call fcn.00413560
add esp, 8
mov edx, dword [esp + 0x24]
mov ecx, edi
call fcn.00490830
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret