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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x4e2040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
push esi
mov esi, dword [ebx]
mov dword [ebp - 0x3c], esi
push edi
test edx, edx
jne 0x47664c
test eax, eax
je 0x476bf6
mov edi, dword [ebx + 0xf0]
test edi, edi
je 0x476bf6
test eax, eax
jne 0x476678
mov edx, dword [edi]
mov ecx, esi
call fcn.004765cb
mov ecx, dword [ebp - 0x34]
test eax, eax
mov eax, dword [ebp - 0x38]
je 0x476678
or dword [edi + 0x1c], 0x1000
cmp byte [esi + 0xb1], 0
je 0x4766ab
test eax, eax
jne 0x47673a
cmp byte [edi + 0x2b], al
je 0x47669a
cmp dword [esi + 0xac], eax
jne 0x47673a
mov eax, dword [esi + 0xac]
mov dword [edi + 0x14], eax
cmp eax, 1
jne 0x4766ab
or dword [edi + 0x1c], eax
mov edx, 0x10000
test edx, ecx
je 0x476724
or dword [edi + 0x1c], edx
xor eax, eax
and dword [ebp - 0x2c], 0
cmp ax, word [edi + 0x22]
jge 0x476724
xor edx, edx
mov dword [ebp - 0x28], edx
mov ecx, dword [edi + 4]
add ecx, edx
mov dword [ebp - 0x30], ecx
mov edx, dword [ecx + 4]
mov eax, edx
and eax, 0xf0
je 0x47674c
cmp eax, 0x10
jne 0x4766e5
mov byte [ecx + 8], 0x41
test byte [ecx + 0xe], 1
je 0x476709
movsx eax, word [edi + 0x20]
cmp eax, dword [ebp - 0x2c]
je 0x476709
test dl, 0xf
jne 0x476709
and edx, 0xfffffff2
or edx, 2
mov dword [ecx + 4], edx
or dword [edi + 0x1c], 0x800
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
inc ecx
movsx eax, word [edi + 0x22]
add edx, 0x10
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], edx
cmp ecx, eax
jl 0x4766c8
mov ecx, dword [ebp - 0x34]
test cl, cl
jns 0x4767b8
mov eax, dword [edi + 0x1c]
test al, 8
je 0x47678e
push str.AUTOINCREMENT_not_allowed_on_WITHOUT_ROWID_tables
jmp 0x47673f
push 0x4c8c24
push ebx
call fcn.00441b18
pop ecx
pop ecx
jmp 0x476bf6
test byte [ecx + 0xe], 4
je 0x476777
mov edx, 0x4c8c24
call fcn.004419fa
push eax
mov eax, dword [ebp - 0x30]
push dword [eax]
push dword [edi]
push str.unknown_datatype_for__s._s:___s_
push ebx
call fcn.00441b18
add esp, 0x14
jmp 0x476bf6
push dword [ecx]
push dword [edi]
push str.missing_datatype_for__s._s
push ebx
call fcn.00441b18
add esp, 0x10
jmp 0x476bf6
test al, 4
jne 0x4767a7
push dword [edi]
push str.PRIMARY_KEY_missing_on_table__s
push ebx
call fcn.00441b18
add esp, 0xc
jmp 0x476bf6
or eax, 0x280
mov edx, edi
mov ecx, ebx
mov dword [edi + 0x1c], eax
call fcn.0047603e
mov edx, dword [edi + 0x3c]
mov ecx, esi
call fcn.004864ff
cmp dword [edi + 0x10], 0
mov dword [ebp - 0x2c], eax
je 0x4767f6
push dword [edi + 0x10]
mov edx, edi
mov ecx, ebx
push 0
push 4
call fcn.00469002
add esp, 0xc
cmp dword [ebx + 0x24], 0
je 0x4767f6
mov edx, dword [edi + 0x10]
test edx, edx
je 0x4767f2
mov ecx, esi
call fcn.0046ac05
and dword [edi + 0x10], 0
test byte [edi + 0x1c], 0x60
je 0x47688c
xor edx, edx
xor eax, eax
and dword [ebp - 0x28], edx
mov dword [ebp - 0x30], edx
cmp ax, word [edi + 0x22]
jge 0x47687c
xor ecx, ecx
mov dword [ebp - 0x24], ecx
mov eax, dword [edi + 4]
add eax, ecx
test byte [eax + 0xe], 0x60
je 0x476886
mov edx, eax
mov ecx, edi
call fcn.004746b0
push 0
push eax
push 8
mov edx, edi
mov ecx, ebx
call fcn.00469002
add esp, 0xc
test eax, eax
je 0x476860
push 0
push 0
push 0x79
pop edx
mov ecx, esi
call fcn.004699ad
push eax
mov eax, dword [edi + 4]
mov edx, edi
add eax, dword [ebp - 0x24]
mov ecx, ebx
push eax
call fcn.0047464c
add esp, 0x10
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
inc dword [ebp - 0x28]
add ecx, 0x10
movsx eax, word [edi + 0x22]
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x28], eax
jl 0x476815
test edx, edx
jne 0x47688c
push str.must_have_at_least_one_non_generated_column
jmp 0x47673f
inc edx
mov dword [ebp - 0x30], edx
jmp 0x476866
mov ecx, edi
call fcn.00475eb8
mov eax, dword [edi + 8]
test eax, eax
je 0x4768ad
mov esi, eax
mov ecx, esi
call fcn.00475efa
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x47689c
mov esi, dword [ebp - 0x3c]
cmp byte [esi + 0xb1], 0
jne 0x476b91
mov ecx, ebx
call fcn.00488de5
mov dword [ebp - 0x24], eax
test eax, eax
je 0x476bf6
xor ecx, ecx
push ecx
push ecx
push ecx
push 0x7a
pop edx
mov ecx, eax
call fcn.004591cc
mov al, byte [edi + 0x2b]
add esp, 0xc
test al, al
mov edx, str.TABLE
mov ecx, str.VIEW
cmove ecx, edx
mov edx, str.table
mov dword [ebp - 0x40], ecx
mov ecx, str.view
cmove ecx, edx
cmp dword [ebp - 0x38], 0
mov dword [ebp - 0x48], ecx
je 0x476ab9
cmp byte [ebx + 0xd4], 0
je 0x476925
inc dword [ebx + 0x24]
mov dword [ebx + 0xc], 1
jmp 0x476bf6
mov eax, dword [ebx + 0x2c]
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x28], eax
inc eax
mov dword [ebp - 0x34], eax
inc eax
cmp dword [ebx + 0x78], 0
mov dword [ebx + 0x2c], eax
mov dword [ebp - 0x30], eax
mov eax, ebx
cmovne eax, dword [ebx + 0x78]
mov byte [eax + 0x15], 1
push dword [ebx + 0x60]
push 1
push 0x71
pop edx
call fcn.004591cc
mov ecx, dword [ebp - 0x24]
add esp, 0xc
push 0x10
pop edx
call fcn.0045974e
mov dword [ebx + 0x28], 2
mov eax, dword [ecx + 0x6c]
mov dword [ebp - 0x40], eax
inc eax
push eax
push 0
push dword [ebp - 0x28]
push 0xb
pop edx
call fcn.004591cc
add esp, 0xc
cmp dword [ebx + 0x24], 0
jne 0x476bf6
mov edx, dword [ebp - 0x38]
mov ecx, ebx
push 0x41
call fcn.00488d2c
pop ecx
test eax, eax
je 0x476bf6
movzx ecx, word [eax + 0x22]
mov word [edi + 0x24], cx
mov word [edi + 0x22], cx
mov ecx, dword [eax + 4]
mov dword [edi + 4], ecx
xor ecx, ecx
and dword [eax + 4], ecx
push eax
push esi
mov word [eax + 0x22], cx
call fcn.00474916
mov esi, dword [ebp - 0x28]
xor eax, eax
mov edx, dword [ebp - 0x38]
mov ecx, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 0x20], 0xd
mov dword [ebp - 0x1c], esi
call fcn.0048cb09
add esp, 0xc
cmp dword [ebx + 0x24], 0
jne 0x476bf6
mov edx, esi
mov esi, dword [ebp - 0x24]
mov ecx, esi
call fcn.00459511
mov edx, dword [ebp - 0x40]
mov ecx, esi
call fcn.00459a36
mov ecx, dword [esi + 0x6c]
push 0
push 0
mov dword [eax + 8], ecx
mov ecx, esi
push dword [ebp - 0x1c]
push 0xc
pop edx
call fcn.004591cc
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov esi, eax
push dword [ebp - 0x34]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x61
pop edx
call fcn.004591cc
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov edx, edi
push 0
call fcn.0047ee11
pop ecx
mov ecx, dword [ebp - 0x24]
push 0
push dword [ebp - 0x30]
push 1
push 0x7f
pop edx
call fcn.004591cc
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov edx, 0x80
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push 1
call fcn.004591cc
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov edx, esi
call fcn.00459225
mov edx, esi
mov esi, dword [ebp - 0x24]
mov ecx, esi
call fcn.00459a36
mov ecx, dword [esi + 0x6c]
push 0
push 0
push 1
mov dword [eax + 8], ecx
mov ecx, esi
push 0x7a
pop edx
call fcn.004591cc
mov esi, dword [ebp - 0x3c]
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00475c54
jmp 0x476af3
cmp dword [ebp - 0x34], 0
lea eax, [ebx + 0xc8]
mov edx, dword [ebp - 0x44]
cmovne edx, eax
mov eax, dword [edx]
mov ecx, eax
sub ecx, dword [ebx + 0xc0]
cmp byte [eax], 0x3b
je 0x476adb
add ecx, dword [edx + 4]
push dword [ebx + 0xc0]
push ecx
push dword [ebp - 0x40]
push str.CREATE__s__.s
push esi
call fcn.00440d10
add esp, 0x14
push dword [ebx + 0x5c]
mov ecx, dword [ebp - 0x2c]
push eax
push dword [ebx + 0x60]
mov dword [ebp - 0x3c], eax
push dword [edi]
mov eax, dword [esi + 0x10]
push dword [edi]
shl ecx, 4
push dword [ebp - 0x48]
mov dword [ebp - 0x40], ecx
push dword [ecx + eax]
push str.UPDATE__Q.sqlite_master_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
push ebx
call fcn.00473fa3
mov edx, dword [ebp - 0x3c]
add esp, 0x24
test edx, edx
je 0x476b2f
mov ecx, esi
call fcn.0043eeff
mov edx, dword [ebp - 0x2c]
mov ecx, ebx
call fcn.00475b69
test byte [edi + 0x1c], 8
je 0x476b67
cmp byte [ebx + 0xd4], 0
jne 0x476b67
mov ecx, dword [esi + 0x10]
add ecx, dword [ebp - 0x40]
mov eax, dword [ecx + 0xc]
cmp dword [eax + 0x48], 0
jne 0x476b67
push dword [ecx]
push str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
push ebx
call fcn.00473fa3
add esp, 0xc
push 0
push ecx
push dword [edi]
push str.tbl_name_q_AND_type_trigger
push esi
call fcn.00440d10
mov edx, dword [ebp - 0x2c]
add esp, 0x10
mov ecx, dword [ebp - 0x24]
push eax
call fcn.00459481
cmp byte [esi + 0xb1], 0
pop ecx
pop ecx
je 0x476bd0
mov ecx, dword [edi + 0x3c]
mov edx, dword [edi]
push edi
lea ecx, [ecx + 8]
call fcn.00443345
pop ecx
test eax, eax
je 0x476bad
mov ecx, esi
call fcn.0043f47b
jmp 0x476bf6
and dword [ebx + 0xf0], 0
or dword [esi + 0x18], 1
push str.sqlite_sequence
push dword [edi]
call fcn.004b5b50
pop ecx
pop ecx
test eax, eax
jne 0x476bd0
mov eax, dword [edi + 0x3c]
mov dword [eax + 0x48], edi
cmp dword [ebp - 0x38], 0
jne 0x476bf6
cmp byte [edi + 0x2b], 0
jne 0x476bf6
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax]
test eax, eax
jne 0x476bea
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
sub eax, dword [ebx + 0xc0]
add eax, 0xd
mov dword [edi + 0x2c], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b0ce6
leave
ret