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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x100d20c0]
xor eax, esp
mov dword [esp + 0x68], eax
and dword [esp + 0x1c], 0
mov eax, edx
push ebx
mov ebx, ecx
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
xor edx, edx
push esi
inc edx
mov dword [esp + 0x30], eax
mov esi, dword [ebx + 0x18]
push edi
mov byte [ebx + 0xa5], dl
or esi, 0xffffffbf
cmp eax, 1
mov dword [esp + 0x18], ebx
mov eax, dword [ebp + 0xc]
mov edx, str.sqlite_master
mov edi, str.sqlite_temp_master
mov dword [esp + 0x3c], eax
cmove edx, edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x5c]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
xor edx, edx
push edx
push eax
push 5
lea eax, [esp + 0x38]
mov dword [esp + 0x68], str.table
push eax
mov dword [esp + 0x78], 0x100b9f18
mov dword [esp + 0x7c], str.CREATE_TABLE_x_type_text_name_text_tbl_name_text_rootpage_int_sql_text_
mov dword [esp + 0x80], edx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
call fcn.100777dc
and dword [ebx + 0x18], esi
mov edi, dword [esp + 0x38]
test edi, edi
jne 0x10077d4e
mov esi, dword [esp + 0xc]
mov edi, dword [ebx + 0x10]
shl esi, 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], edi
mov ecx, dword [edi + esi + 4]
test ecx, ecx
jne 0x10077afe
mov eax, dword [edi + 0x1c]
inc ecx
or word [eax + 0x4e], cx
xor edi, edi
jmp 0x10077d6c
call fcn.10043f70
mov ecx, dword [edi + esi + 4]
test ecx, ecx
je 0x10077b11
movzx eax, byte [ecx + 8]
jmp 0x10077b13
xor eax, eax
test eax, eax
jne 0x10077b48
push eax
xor edx, edx
call fcn.1004636a
mov edi, eax
test edi, edi
je 0x10077b3d
mov ecx, edi
call fcn.10094f5a
mov ecx, dword [esp + 0x14]
mov edx, ebx
push eax
call fcn.100369c1
jmp 0x10077d29
mov edi, dword [esp + 0x10]
xor eax, eax
inc eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x48]
xor ebx, ebx
mov dword [esp + 0x20], eax
mov ecx, dword [edi + esi + 4]
inc ebx
push eax
mov edx, ebx
call fcn.1004ba09
mov eax, dword [esp + 0x20]
add eax, 4
mov dword [esp + 0x20], eax
cmp ebx, 5
jl 0x10077b52
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx + 0x20]
and eax, 0x2000000
or eax, 0
je 0x10077b8f
xor eax, eax
lea edi, [esp + 0x48]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + esi + 0xc]
mov eax, dword [esp + 0x48]
mov dword [ecx], eax
mov eax, dword [esp + 0x58]
test eax, eax
je 0x10077bd5
cmp dword [esp + 0xc], 0
jne 0x10077c3f
test byte [ebx + 0x18], 0x40
jne 0x10077c3f
and al, 3
mov ecx, ebx
push 1
movzx edx, al
pop eax
push 0
cmove edx, eax
push str.BINARY
mov byte [ebx + 0x4e], dl
call fcn.1006c90c
mov dword [ebx + 8], eax
mov ecx, dword [edi + esi + 0xc]
mov al, byte [ebx + 0x4e]
mov byte [ecx + 0x4d], al
mov eax, dword [edi + esi + 0xc]
cmp dword [eax + 0x50], 0
jne 0x10077c13
mov ecx, dword [esp + 0x50]
call fcn.10039d91
test eax, eax
mov ecx, 0xfffff830
cmove eax, ecx
mov ecx, dword [edi + esi + 0xc]
mov dword [ecx + 0x50], eax
mov edx, dword [edi + esi + 0xc]
mov ecx, dword [edi + esi + 4]
mov edx, dword [edx + 0x50]
call fcn.10045e09
mov eax, dword [edi + esi + 0xc]
mov ecx, dword [esp + 0x4c]
mov byte [eax + 0x4c], cl
mov eax, dword [edi + esi + 0xc]
cmp byte [eax + 0x4c], 0
jne 0x10077c2e
xor edx, edx
inc edx
mov byte [eax + 0x4c], dl
mov eax, dword [edi + esi + 0xc]
cmp byte [eax + 0x4c], 4
jbe 0x10077c61
push str.unsupported_file_format
jmp 0x10077c4c
and eax, 3
cmp al, byte [ebx + 0x4e]
je 0x10077bd5
push str.attached_databases_must_use_the_same_text_encoding_as_main_database
mov ecx, dword [esp + 0x18]
mov edx, ebx
call fcn.100369c1
xor eax, eax
lea edi, [eax + 1]
jmp 0x10077d29
cmp dword [esp + 0xc], 0
jne 0x10077c77
cmp ecx, 4
jl 0x10077c77
mov eax, dword [ebx + 0x24]
and dword [ebx + 0x20], 0xfffffffd
mov dword [ebx + 0x24], eax
mov eax, dword [edi + esi + 4]
push dword [esp + 0x1c]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x10]
push dword [esi + eax]
push str.SELECTFROM__w_._s_ORDER_BY_rowid
push ebx
call fcn.10038011
mov esi, dword [ebx + 0x150]
lea ecx, [esp + 0x3c]
and dword [ebx + 0x150], 0
add esp, 0x10
mov dword [esp + 0x1c], eax
push 0
push ecx
push fcn.100777dc
push eax
push ebx
call fcn.100741e9
mov edx, dword [esp + 0x1c]
mov edi, eax
test edi, edi
mov dword [ebx + 0x150], esi
cmove edi, dword [esp + 0x38]
test edx, edx
je 0x10077cdf
mov ecx, ebx
call fcn.10036499
test edi, edi
jne 0x10077cee
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.1006659e
cmp byte [ebx + 0x51], 0
je 0x10077cfe
push 7
pop edi
mov ecx, ebx
call fcn.10067c10
test edi, edi
je 0x10077d0f
mov eax, dword [ebx + 0x20]
and eax, 0x8000000
or eax, 0
je 0x10077d25
mov eax, dword [ebx + 0x10]
xor ecx, ecx
mov esi, dword [esp + 0x24]
inc ecx
mov eax, dword [esi + eax + 0xc]
or word [eax + 0x4e], cx
xor edi, edi
jmp 0x10077d29
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x28], 0
je 0x10077d3d
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + esi + 4]
call fcn.10046db4
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + esi + 4]
call fcn.10043fe8
test edi, edi
je 0x10077d6c
cmp edi, 7
je 0x10077d5b
cmp edi, 0xc0a
jne 0x10077d61
push ebx
call fcn.100369eb
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.10067bad
mov ecx, dword [esp + 0x74]
mov eax, edi
pop edi
pop esi
mov byte [ebx + 0xa5], 0
pop ebx
xor ecx, esp
call fcn.100a9985
mov esp, ebp
pop ebp
ret 8