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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx + 0x18]
push edi
xor edi, edi
or esi, 0xffffffbf
cmp ecx, 1
mov dword [esp + 0x10], edi
mov byte [ebx + 0xb1], 1
mov dword [esp + 0x3c], str.table
jne 0x47918d
mov eax, str.sqlite_temp_master
mov dword [esp + 0x1c], eax
jmp 0x479199
mov dword [esp + 0x1c], str.sqlite_master
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x10]
push edi
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x5c]
push 5
push eax
mov dword [esp + 0x58], 0x4bef90
mov dword [esp + 0x5c], str.CREATE_TABLE_x_type_text_name_text_tbl_name_text_rootpage_int_sql_text_
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
call fcn.00478f40
mov eax, dword [esp + 0x70]
and dword [ebx + 0x18], esi
add esp, 0x10
cmp eax, edi
je 0x4791fe
mov edi, eax
jmp 0x4796a0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x10]
shl eax, 4
mov edi, dword [ecx + eax + 4]
test edi, edi
lea esi, [ecx + eax]
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], esi
jne 0x479231
mov ecx, dword [ecx + 0x1c]
or word [ecx + 0x4e], 1
xor eax, eax
mov byte [ebx + 0xb1], al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [edi + 9], 0
je 0x479246
add dword [edi + 0xc], 1
cmp byte [edi + 0xa], 0
jne 0x479246
call fcn.0042d6a0
mov esi, dword [esi + 4]
test esi, esi
mov dword [esp + 0x18], esi
je 0x47925d
movzx eax, byte [esi + 8]
test eax, eax
jne 0x47944d
mov ecx, esi
cmp byte [ecx + 9], 0
mov esi, dword [ecx + 4]
mov edx, dword [esi]
mov dword [esp + 0x24], edx
mov dword [esp + 0x10], 0
je 0x479289
add dword [ecx + 0xc], 1
cmp byte [ecx + 0xa], 0
jne 0x479289
mov edi, ecx
call fcn.0042d6a0
mov ecx, edi
mov al, byte [ecx + 8]
cmp al, 2
je 0x47940b
cmp al, 1
je 0x47940b
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
and eax, 0x2000000
xor edx, edx
or eax, edx
je 0x4792bb
mov eax, dword [esp + 0x24]
cmp byte [eax + 0xe], dl
jne 0x4792bb
and word [esi + 0x18], 0xfffe
movzx edx, word [esi + 0x18]
test dl, dl
jns 0x4792d8
mov eax, dword [esi + 0x50]
cmp dword [eax], 0
je 0x4792d8
mov dword [esp + 0x10], 0x106
jmp 0x47940b
cmp byte [ecx + 9], 0
mov eax, dword [ecx + 4]
je 0x47931b
cmp dword [eax + 0x50], ecx
je 0x4792f9
test byte [eax + 0x18], 0x40
je 0x4792f9
mov dword [esp + 0x10], 0x106
jmp 0x47940b
mov eax, dword [eax + 0x4c]
test eax, eax
je 0x47931b
mov edi, 1
cmp dword [eax], ecx
je 0x479314
cmp dword [eax + 4], edi
jne 0x479314
cmp byte [eax + 8], 1
jne 0x4792cb
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x479305
mov eax, edx
and eax, 0xffef
cmp dword [esi + 0x30], 0
mov dword [esp + 0x10], 0
mov word [esi + 0x18], ax
jne 0x47933b
or eax, 0x10
mov word [esi + 0x18], ax
cmp dword [esi + 0xc], 0
jne 0x479352
mov eax, esi
call fcn.00430440
test eax, eax
mov dword [esp + 0x10], eax
je 0x47933b
jmp 0x479359
cmp dword [esp + 0x10], 0
je 0x47938d
cmp byte [esi + 0x14], 0
jne 0x47938d
mov eax, dword [esi + 0xc]
test eax, eax
je 0x47938d
mov dword [esi + 0xc], 0
mov eax, dword [eax + 0x48]
mov edi, dword [eax + 0x14]
call fcn.00423c10
mov eax, dword [edi + 0xe4]
mov ecx, dword [eax + 0x10]
or ecx, dword [eax + 0x14]
jne 0x47938d
mov eax, edi
call fcn.00426370
cmp byte [esp + 0x10], 5
jne 0x4793d2
cmp byte [esi + 0x14], 0
jne 0x4793d2
mov edi, dword [esi + 4]
mov eax, dword [edi + 0x1c0]
add edi, 0x1c0
test eax, eax
je 0x4793d2
mov ecx, dword [edi + 8]
test ecx, ecx
jl 0x4793d2
mov edx, dword [edi + 4]
push ecx
push edx
call eax
add esp, 8
test eax, eax
je 0x4793cb
add dword [edi + 8], 1
jmp 0x47933b
mov dword [edi + 8], 0xffffffff
cmp dword [esp + 0x10], 0
jne 0x47940b
mov eax, dword [esp + 0x18]
cmp byte [eax + 8], 0
jne 0x4793fd
add dword [esi + 0x2c], 1
cmp byte [eax + 9], 0
je 0x4793fd
mov byte [eax + 0x28], 1
mov ecx, dword [esi + 0x4c]
lea edx, [eax + 0x20]
mov dword [eax + 0x2c], ecx
mov dword [esi + 0x4c], edx
mov byte [eax + 8], 1
cmp byte [esi + 0x14], 1
jae 0x47940b
mov byte [esi + 0x14], 1
mov esi, dword [esp + 0x18]
cmp byte [esi + 9], 0
je 0x479420
add dword [esi + 0xc], 0xffffffff
jne 0x479420
call fcn.0042d660
mov edx, dword [esp + 0x10]
test edx, edx
mov edi, edx
je 0x479445
call fcn.004a8b10
mov esi, dword [ebp + 0x10]
push ebx
mov ebx, eax
call fcn.004199d0
mov ebx, dword [ebp + 8]
add esp, 4
jmp 0x479688
mov dword [esp + 0x10], 1
xor eax, eax
lea edi, [esp + 0x28]
lea esi, [eax + 1]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
push edi
push esi
call fcn.00438160
mov eax, esi
add esp, 8
add edi, 4
cmp eax, 5
jl 0x479453
mov eax, dword [ebx + 0x20]
and eax, 0x2000000
xor ecx, ecx
or eax, ecx
je 0x47948f
xor eax, eax
mov dword [esp + 0x2c], eax
mov edi, eax
mov dword [esp + 0x34], eax
mov ecx, eax
jmp 0x47949b
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
test ecx, ecx
mov esi, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
mov dword [edx], eax
je 0x4794e3
cmp dword [ebp + 0xc], 0
jne 0x479508
test byte [ebx + 0x18], 0x40
jne 0x479508
and cl, 3
jne 0x4794bb
mov cl, 1
cmp dword [ebx + 0xbc], 0
jle 0x4794d3
cmp cl, byte [ebx + 0x54]
je 0x4794d3
mov edi, 6
jmp 0x479675
mov esi, dword [ebp + 8]
mov bl, cl
call fcn.004678c0
mov ebx, esi
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0xc]
mov cl, byte [ebx + 0x54]
mov byte [eax + 0x4d], cl
mov edx, dword [esi + 0xc]
cmp dword [edx + 0x50], 0
jne 0x479564
test edi, edi
jge 0x479542
cmp edi, 0x80000000
jne 0x479540
mov eax, 0x7fffffff
jmp 0x47954d
and ecx, 3
cmp cl, byte [ebx + 0x54]
je 0x4794e3
mov ebx, str.attached_databases_must_use_the_same_text_encoding_as_main_database
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.00419890
mov esi, dword [ebp + 0x10]
mov ebx, eax
mov eax, dword [esi]
test eax, eax
je 0x479531
mov ecx, edi
call fcn.00419270
mov dword [esi], ebx
mov ebx, dword [ebp + 8]
mov edi, 1
jmp 0x479675
neg edi
mov eax, edi
test eax, eax
jne 0x47954d
mov eax, 0xfffff830
mov ecx, edx
mov dword [ecx + 0x50], eax
mov edx, dword [esi + 0xc]
mov eax, dword [edx + 0x50]
push eax
mov eax, dword [esi + 4]
call fcn.00430020
add esp, 4
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0x2c]
mov byte [ecx + 0x4c], al
mov edx, dword [esi + 0xc]
cmp byte [edx + 0x4c], 0
jne 0x47957d
mov ecx, edx
mov byte [ecx + 0x4c], 1
mov edx, dword [esi + 0xc]
cmp byte [edx + 0x4c], 4
jbe 0x47958d
mov ebx, str.unsupported_file_format
jmp 0x479515
cmp dword [ebp + 0xc], 0
jne 0x4795a2
cmp eax, 4
jl 0x4795a2
mov eax, dword [ebx + 0x24]
and dword [ebx + 0x20], 0xfffffffd
mov dword [ebx + 0x24], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 0x30]
mov edx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [ecx + eax]
push edx
push str.SELECTFROM__w_._s_ORDER_BY_rowid
mov edi, ebx
call fcn.0041ba60
add esp, 0xc
push 0
lea ecx, [esp + 0x58]
push ecx
mov esi, eax
mov eax, dword [ebx + 0x16c]
push fcn.00478f40
push esi
push ebx
mov dword [esp + 0x38], eax
mov dword [ebx + 0x16c], 0
call fcn.00473cb0
mov edx, dword [esp + 0x38]
mov edi, eax
add esp, 0x14
test edi, edi
mov dword [ebx + 0x16c], edx
jne 0x479612
mov edi, dword [esp + 0x60]
test esi, esi
je 0x47961f
mov eax, esi
mov ecx, ebx
call fcn.00419270
test edi, edi
jne 0x47962d
mov eax, dword [ebp + 0xc]
mov ecx, ebx
call fcn.0045e950
cmp byte [ebx + 0x57], 0
je 0x47964c
mov eax, ebx
mov edi, 7
call fcn.00460930
mov eax, dword [ebx + 0x10]
add eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x479675
test edi, edi
je 0x479663
mov eax, dword [ebx + 0x20]
and eax, 0x8000000
xor ecx, ecx
or eax, ecx
je 0x479675
cmp edi, 7
je 0x479675
mov eax, dword [ebx + 0x10]
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + eax + 0xc]
or word [eax + 0x4e], 1
xor edi, edi
cmp dword [esp + 0x10], 0
je 0x479688
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 4]
call fcn.00431800
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 4]
cmp byte [esi + 9], 0
je 0x4796a0
add dword [esi + 0xc], 0xffffffff
jne 0x4796a0
call fcn.0042d660
test edi, edi
je 0x4796c4
cmp edi, 7
je 0x4796b1
cmp edi, 0xc0a
jne 0x4796ba
push ebx
call fcn.00419a00
add esp, 4
mov eax, dword [ebp + 0xc]
mov esi, ebx
call fcn.004608c0
mov eax, edi
pop edi
pop esi
mov byte [ebx + 0xb1], 0
pop ebx
mov esp, ebp
pop ebp
ret