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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx]
push edi
mov dword [esp + 0xc], esi
jne 0x4ec435
cmp dword [ebp + 0x18], 0
je 0x4ec91f
mov edi, dword [ebx + 0x1b0]
mov dword [esp + 0x18], edi
test edi, edi
je 0x4ec91f
cmp byte [esi + 0x99], 0
je 0x4ec461
mov eax, dword [esi + 0x94]
mov dword [edi + 0x1c], eax
cmp eax, 1
jne 0x4ec461
or dword [edi + 0x24], eax
test byte [ebp + 0x14], 0x20
je 0x4ec4ad
mov eax, dword [edi + 0x24]
test al, 8
je 0x4ec484
push str.AUTOINCREMENT_not_allowed_on_WITHOUT_ROWID_tables
mov esi, ebx
call fcn.004b2660
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 4
jne 0x4ec49d
mov eax, dword [edi]
push eax
push str.PRIMARY_KEY_missing_on_table__s
mov esi, ebx
call fcn.004b2660
mov esi, dword [esp + 0x14]
jmp 0x4ec4aa
or eax, 0x60
push edi
push ebx
mov dword [edi + 0x24], eax
call fcn.004ebff0
add esp, 8
mov edx, dword [edi + 0x48]
mov dword [esp + 0x10], 0xfff0bdc0
test edx, edx
je 0x4ec4e5
cmp dword [esi + 0x14], 0
mov dword [esp + 0x10], 0
jle 0x4ec4e5
mov eax, dword [esi + 0x10]
add eax, 0xc
cmp dword [eax], edx
je 0x4ec4e5
mov ecx, dword [esp + 0x10]
inc ecx
add eax, 0x10
cmp ecx, dword [esi + 0x14]
mov dword [esp + 0x10], ecx
jl 0x4ec4d0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4ec500
push eax
push 0
push 4
push ebx
mov esi, edi
call fcn.004df850
mov esi, dword [esp + 0x1c]
add esp, 0x10
push edi
call fcn.004ebee0
mov eax, dword [edi + 8]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4ec542
jmp 0x4ec524
mov eax, dword [esp + 0x14]
mov edi, eax
call fcn.004ebf60
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4ec520
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
cmp byte [esi + 0x99], 0
jne 0x4ec89a
mov esi, dword [ebx + 8]
test esi, esi
jne 0x4ec56b
mov edi, ebx
call fcn.005024e0
mov edi, dword [esp + 0x18]
mov esi, eax
test esi, esi
je 0x4ec91f
push 0
push 0
push 0
push 0x70
push esi
call fcn.004cd400
add esp, 0x14
cmp dword [edi + 0xc], 0
jne 0x4ec594
mov dword [esp + 0x20], str.table
mov dword [esp + 0x1c], str.TABLE
jmp 0x4ec5a4
mov dword [esp + 0x20], str.view
mov dword [esp + 0x1c], str.VIEW
cmp dword [ebp + 0x18], 0
je 0x4ec789
mov eax, dword [ebx + 0x2c]
inc eax
mov dword [esp + 0x1c], eax
inc eax
mov dword [esp + 0x14], eax
inc eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x78]
test eax, eax
jne 0x4ec5c8
mov eax, ebx
mov edx, dword [esp + 0x10]
push edx
mov byte [eax + 0x15], 1
mov eax, dword [ebx + 0x64]
push eax
push 1
push 0x69
push esi
call fcn.004cd400
mov eax, dword [esi + 0x88]
add esp, 0x14
test eax, eax
jle 0x4ec5fc
mov edx, dword [esi + 0x58]
lea ecx, [eax + eax*4]
mov eax, 0x10
mov word [edx + ecx*4 - 0x12], ax
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x28], 2
mov eax, dword [esi + 0x88]
inc eax
push eax
push 0
push ecx
push 0xf
push esi
mov dword [esp + 0x38], eax
call fcn.004cd400
mov ecx, dword [ebp + 0x18]
mov edx, dword [esp + 0x30]
xor eax, eax
add esp, 0x14
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push eax
push ecx
push ebx
mov byte [esp + 0x34], 0xd
mov dword [esp + 0x38], edx
call fcn.00506f20
mov edx, dword [esp + 0x28]
add esp, 0xc
push 0
push 0
push edx
push 0x35
push esi
call fcn.004cd400
mov eax, dword [esi + 0xc]
mov byte [eax + 0x13], 0
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0x38]
add esp, 0x14
add eax, 0xffffffff
mov dword [ecx + 0x1c], 0
mov ecx, dword [esi + 0x88]
jns 0x4ec685
lea eax, [ecx - 1]
mov edx, dword [esi]
cmp byte [edx + 0x45], 0
je 0x4ec694
mov eax, 0x5ef850
jmp 0x4ec69d
mov edx, dword [esi + 0x58]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 8], ecx
cmp dword [ebx + 0x24], 0
jne 0x4ec91f
mov eax, dword [ebp + 0x18]
push ebx
call fcn.00502420
add esp, 4
test eax, eax
je 0x4ec91f
mov cx, word [eax + 0x2a]
mov word [edi + 0x2a], cx
mov edx, dword [eax + 4]
xor ecx, ecx
mov dword [edi + 4], edx
mov word [eax + 0x2a], cx
mov dword [eax + 4], ecx
mov ecx, eax
mov eax, dword [esp + 0xc]
call fcn.004eabe0
mov edx, dword [esp + 0x2c]
push 0
push 0
push edx
push 0x10
push esi
call fcn.004cd400
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
add esp, 0x14
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push edx
push 0x63
push esi
call fcn.004cd400
add esp, 0x14
push 0
push esi
mov eax, edi
call fcn.004f7240
mov eax, dword [esp + 0x1c]
push 0
inc eax
push eax
push 1
push 0x73
push esi
call fcn.004cd400
mov eax, dword [esp + 0x30]
add esp, 0x1c
inc eax
push eax
mov eax, dword [esp + 0x18]
push eax
push 1
push 0x74
push esi
call fcn.004cd400
mov ecx, dword [esp + 0x30]
add esp, 0x14
push 0
push ecx
push 0
push 0xd
push esi
call fcn.004cd400
mov eax, dword [esp + 0x30]
add esp, 0x14
mov edx, esi
call fcn.004cdb30
push 0
push 0
push 1
push 0x70
push esi
call fcn.004cd400
mov edx, dword [esp + 0x20]
add esp, 0x14
push edi
push edx
call fcn.004ebc20
add esp, 8
jmp 0x4ec7c8
cmp byte [ebp + 0x14], 0
lea edx, [ebx + 0x184]
jne 0x4ec798
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx]
mov edi, dword [ebx + 0x17c]
mov eax, ecx
sub eax, edi
cmp byte [ecx], 0x3b
je 0x4ec7ac
add eax, dword [edx + 4]
push edi
mov edi, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x24]
push eax
push str.CREATE__s__.s
call fcn.004b1850
mov edi, dword [esp + 0x28]
add esp, 0x10
mov edx, dword [ebx + 0x60]
mov ecx, dword [esp + 0x10]
push edx
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x20]
mov eax, dword [edi]
push edx
mov edx, dword [ebx + 0x64]
push edx
mov edx, dword [esp + 0x18]
push eax
push eax
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [edx + 0x10]
shl ecx, 4
mov dword [esp + 0x2c], ecx
mov ecx, dword [ecx + eax]
push str.sqlite_master
push ecx
push str.UPDATE__Q._s_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
push ebx
call fcn.004ea020
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x34]
call fcn.004afaf0
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
mov ecx, dword [esp + 0x3c]
mov edx, dword [eax + ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [esp + 0x38]
mov edx, dword [ebx + 8]
inc eax
push eax
push 1
push ecx
push 0x66
push edx
call fcn.004cd400
add esp, 0x3c
test byte [edi + 0x24], 8
je 0x4ec866
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x10]
add eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xc]
cmp dword [ecx + 0x48], 0
jne 0x4ec866
mov edx, dword [eax]
push edx
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
push ebx
call fcn.004ea020
add esp, 0xc
mov eax, dword [edi]
mov edi, dword [esp + 0xc]
push eax
push str.tbl_name_q_AND_type_trigger
call fcn.004b1850
mov ecx, eax
mov eax, dword [esp + 0x18]
add esp, 8
call fcn.004cd690
mov esi, dword [esp + 0xc]
cmp byte [esi + 0x99], 0
mov edi, dword [esp + 0x18]
je 0x4ec91f
mov eax, dword [edi + 0x48]
mov ecx, dword [edi]
push edi
push ecx
add eax, 8
call fcn.004b3e10
add esp, 8
test eax, eax
je 0x4ec8e0
cmp byte [esi + 0x45], 0
jne 0x4ec91f
cmp byte [esi + 0x46], 0
jne 0x4ec91f
cmp dword [esi + 0xa8], 0
mov byte [esi + 0x45], 1
jle 0x4ec8d3
mov dword [esi + 0xf8], 1
inc dword [esi + 0x100]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x1b0], 0
or dword [esi + 0x18], 0x800000
cmp dword [edi + 0xc], 0
jne 0x4ec91f
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
mov ebx, dword [ebx + 0x17c]
jne 0x4ec90b
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
sub edx, ebx
mov ecx, ebx
call fcn.004b2360
add eax, 0xd
mov dword [edi + 0x34], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret