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

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebp, dword [esp + 0x70]
push esi
mov esi, dword [esp + 0x78]
mov edx, dword [esi]
mov ebx, eax
mov ecx, dword [ebx]
mov dword [esp + 0x34], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x14], ecx
mov ecx, dword [esi + 4]
xor eax, eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 0x10]
push edi
mov edi, dword [ebp + 0x34]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
cmp dword [edi + 0x30], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
je 0x1005721d
movzx eax, byte [ebp + 4]
sub eax, 0x74
je 0x100571fb
sub eax, 1
je 0x100571f4
sub eax, 1
je 0x100571ed
mov eax, str.UNION
jmp 0x10057200
mov eax, str.INTERSECT
jmp 0x10057200
mov eax, str.EXCEPT
jmp 0x10057200
mov eax, str.UNION_ALL
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
mov edi, ebx
call fcn.10030a70
add esp, 8
mov dword [esp + 0x10], 1
jmp 0x10057984
cmp dword [edi + 0x3c], eax
je 0x10057269
movzx eax, byte [ebp + 4]
sub eax, 0x74
je 0x1005725c
sub eax, 1
je 0x1005724f
sub eax, 1
je 0x10057242
mov eax, str.UNION
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x10057206
mov eax, str.INTERSECT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x10057206
mov eax, str.EXCEPT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x10057206
mov eax, str.UNION_ALL
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x10057206
mov eax, ebx
call fcn.100389a0
mov cl, byte [esp + 0x38]
cmp cl, 0xc
mov dword [esp + 0x78], eax
jne 0x100572b6
mov eax, dword [ebp]
mov ecx, dword [eax]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x78]
push ecx
push edx
push 0x37
call fcn.10035eb0
mov eax, esi
mov eax, dword [eax + 4]
add esp, 0xc
test eax, eax
je 0x100572ac
mov ecx, esi
mov ecx, dword [ecx + 0x20]
lea edx, [ecx + ecx*4]
mov byte [eax + edx*4 - 0x11], 8
mov esi, dword [esp + 0x7c]
mov cl, 0xe
mov byte [esp + 0x38], cl
mov eax, dword [ebp]
mov edx, dword [edi]
mov eax, dword [eax]
cmp eax, dword [edx]
je 0x100572f7
test byte [ebp + 6], 0x80
je 0x100572e3
push str.all_VALUES_must_have_the_same_number_of_terms
mov edi, ebx
call fcn.10030a70
add esp, 4
mov dword [esp + 0x10], 1
jmp 0x10057984
movzx eax, byte [ebp + 4]
call fcn.100120f0
push eax
push str.SELECTs_to_the_left_and_right_of__s_do_not_have_the_same_number_of_result_columns
jmp 0x10057206
test word [ebp + 6], 0x800
je 0x10057310
lea ecx, [esp + 0x38]
push ecx
push ebp
push ebx
call fcn.100550f0
jmp 0x10057838
cmp dword [ebp + 0x30], 0
je 0x10057329
push esi
push ebp
push ebx
call fcn.100540f0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
movzx eax, byte [ebp + 4]
sub eax, 0x73
je 0x10057661
sub eax, 1
je 0x10057568
sub eax, 1
je 0x10057661
mov eax, dword [ebx + 0x44]
mov esi, dword [esp + 0x78]
lea ecx, [eax + 1]
push 0
mov dword [esp + 0x20], ecx
push eax
add ecx, 1
push 0x37
mov dword [esp + 0x20], eax
mov dword [ebx + 0x44], ecx
call fcn.10035eb0
mov dword [ebp + 0x10], eax
add esp, 0xc
mov eax, ebp
call fcn.10012160
or word [eax + 6], 8
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x4c]
add eax, 6
mov eax, dword [ebx + 0x1d4]
push ecx
xor esi, esi
push edi
push ebx
mov byte [esp + 0x58], 1
mov dword [esp + 0x5c], edx
mov byte [esp + 0x59], 0
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x2c], eax
call fcn.1006fac0
add esp, 0xc
cmp eax, esi
mov dword [esp + 0x10], eax
jne 0x10057984
mov edx, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x7c]
push edx
push 0x37
call fcn.10035eb0
mov ecx, dword [ebp + 0x40]
mov esi, dword [ebp + 0x3c]
mov edx, dword [esp + 0x28]
add esp, 0xc
mov dword [esp + 0x2c], ecx
mov dword [ebp + 0x14], eax
xor eax, eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0x40], eax
mov eax, dword [ebx + 0x1d4]
push ebp
push ebx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x28], eax
call fcn.1006fac0
mov edx, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x34], edi
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x18]
mov edi, dword [edi + 0x1c]
add esp, 0xc
cmp ecx, edi
mov dword [esp + 0x24], edx
jb 0x10057437
ja 0x10057431
mov edx, dword [ebp + 0x18]
cmp edx, eax
jbe 0x10057437
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], edi
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.1002cb00
mov edx, dword [esp + 0x34]
add esp, 8
cmp byte [esp + 0x38], 9
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], edx
jne 0x10057479
mov eax, dword [ebp + 0x34]
test eax, eax
mov ecx, ebp
je 0x1005746b
mov ecx, eax
mov eax, dword [ecx + 0x34]
test eax, eax
jne 0x10057462
mov eax, dword [ecx]
push eax
push 0
push ebx
call fcn.100465b0
add esp, 0xc
mov edi, dword [esp + 0x78]
mov eax, edi
call fcn.100303a0
mov esi, eax
mov eax, edi
mov dword [esp + 0x2c], esi
call fcn.100303a0
mov dword [esp + 0x28], eax
push esi
push ebp
mov eax, ebx
call fcn.1003c640
mov ecx, dword [esp + 0x1c]
push esi
push ecx
push 0x69
mov esi, edi
call fcn.10035eb0
add esp, 0x14
mov eax, ebx
call fcn.100128a0
mov edx, dword [esp + 0x14]
push eax
push edx
push 0x62
mov dword [esp + 0x3c], eax
call fcn.10035eb0
mov esi, dword [esp + 0x3c]
add esp, 0xc
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
push 0
push esi
push eax
mov eax, dword [esp + 0x20]
add eax, 1
push eax
push 0x41
mov eax, edi
call fcn.10035ca0
add esp, 0x14
mov edx, ebx
call fcn.10012860
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [ebp]
push esi
lea edx, [esp + 0x40]
push edx
push 0
push 0
push eax
push ecx
push ebp
call fcn.10051aa0
push esi
mov ecx, edi
call fcn.100138f0
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x38]
add esp, 0x24
push edx
push eax
push 9
mov esi, edi
call fcn.10035eb0
mov ecx, dword [esp + 0x38]
add esp, 0xc
push ecx
mov ecx, edi
call fcn.100138f0
mov eax, dword [esp + 0x18]
add esp, 4
push 0
add eax, 1
push eax
push 0x3a
call fcn.10035eb0
add esp, 0xc
mov edx, dword [esp + 0x14]
push 0
push edx
jmp 0x10057831
mov eax, dword [ebp + 8]
mov dword [edi + 8], eax
mov ecx, dword [ebp + 0xc]
mov dword [edi + 0xc], ecx
mov edx, dword [ebp + 0x3c]
mov dword [edi + 0x3c], edx
mov eax, dword [ebp + 0x40]
lea edx, [esp + 0x38]
push edx
mov dword [edi + 0x40], eax
mov ecx, dword [ebx + 0x1d4]
push edi
xor esi, esi
push ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x2c], ecx
call fcn.1006fac0
add esp, 0xc
cmp eax, esi
mov dword [esp + 0x10], eax
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], esi
jne 0x10057984
mov dword [ebp + 0x34], esi
mov eax, dword [edi + 8]
cmp eax, esi
mov dword [ebp + 8], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp + 0xc], ecx
je 0x100575dc
mov esi, dword [esp + 0x78]
push eax
push 0x88
call fcn.10035f10
add esp, 8
mov dword [esp + 0x2c], eax
xor esi, esi
mov edx, dword [ebx + 0x1d4]
lea eax, [esp + 0x38]
push eax
push ebp
push ebx
mov dword [esp + 0x28], edx
call fcn.1006fac0
mov ecx, dword [ebp + 0x34]
mov dword [ebp + 0x34], edi
mov edx, dword [edi + 0x18]
add esp, 0xc
add dword [ebp + 0x18], edx
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x1c]
adc dword [ebp + 0x1c], eax
mov edi, dword [edi + 0x3c]
cmp edi, esi
mov dword [esp + 0x24], ecx
je 0x10057647
lea ecx, [esp + 0x34]
push ecx
push edi
call fcn.10012e10
add esp, 8
test eax, eax
je 0x10057647
mov eax, dword [esp + 0x34]
cmp eax, esi
jle 0x10057647
mov ecx, dword [ebp + 0x1c]
cdq
cmp ecx, edx
jb 0x10057647
ja 0x10057641
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jbe 0x10057647
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], edx
mov eax, dword [esp + 0x2c]
cmp eax, esi
je 0x1005783b
mov edx, dword [esp + 0x78]
call fcn.1001b350
jmp 0x1005783b
cmp cl, 1
jne 0x10057670
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x14], edx
jmp 0x1005769f
mov eax, dword [ebx + 0x44]
mov esi, dword [esp + 0x78]
push 0
push eax
lea ecx, [eax + 1]
push 0x37
mov dword [esp + 0x20], eax
mov dword [ebx + 0x44], ecx
call fcn.10035eb0
mov dword [ebp + 0x10], eax
add esp, 0xc
mov eax, ebp
call fcn.10012160
add eax, 6
or word [eax], 8
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x1d4]
lea ecx, [esp + 0x60]
push ecx
xor esi, esi
push edi
push ebx
mov byte [esp + 0x6c], 1
mov dword [esp + 0x70], edx
mov byte [esp + 0x6d], 0
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x2c], eax
call fcn.1006fac0
add esp, 0xc
cmp eax, esi
mov dword [esp + 0x10], eax
jne 0x10057984
cmp byte [ebp + 4], 0x75
mov edx, dword [ebp + 0x3c]
mov ecx, dword [ebp + 0x40]
sete al
add al, 1
mov byte [esp + 0x60], al
lea eax, [esp + 0x60]
push eax
mov dword [ebp + 0x34], esi
mov dword [esp + 0x38], edx
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x40], esi
mov edx, dword [ebx + 0x1d4]
push ebp
push ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], edx
call fcn.1006fac0
mov ecx, dword [ebp + 0x30]
mov edx, dword [esp + 0x24]
add esp, 0xc
push ecx
push edx
mov dword [esp + 0x18], eax
call fcn.1002f840
mov eax, dword [ebp + 0x34]
add esp, 8
cmp byte [ebp + 4], 0x73
mov dword [esp + 0x24], eax
mov dword [ebp + 0x34], edi
mov dword [ebp + 0x30], esi
jne 0x10057751
mov ecx, dword [edi + 0x18]
add dword [ebp + 0x18], ecx
mov edx, dword [edi + 0x1c]
adc dword [ebp + 0x1c], edx
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.1002cb00
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [ebp + 0x40], eax
mov al, byte [esp + 0x40]
add esp, 8
cmp al, 1
mov dword [ebp + 0x3c], edx
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], esi
je 0x1005783b
cmp al, 9
jne 0x100577a6
mov eax, dword [ebp + 0x34]
cmp eax, esi
mov ecx, ebp
je 0x10057799
nop
mov ecx, eax
mov eax, dword [ecx + 0x34]
cmp eax, esi
jne 0x10057790
mov ecx, dword [ecx]
push ecx
push esi
push ebx
call fcn.100465b0
add esp, 0xc
mov esi, dword [esp + 0x78]
mov eax, esi
call fcn.100303a0
mov edi, eax
mov eax, esi
mov dword [esp + 0x28], edi
call fcn.100303a0
mov dword [esp + 0x2c], eax
push edi
push ebp
mov eax, ebx
call fcn.1003c640
push edi
mov edi, dword [esp + 0x20]
push edi
push 0x69
call fcn.10035eb0
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add esp, 0x14
push eax
mov eax, dword [ebp]
push ecx
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x40]
push edx
push 0
push 0
push edi
push eax
push ebp
call fcn.10051aa0
mov ecx, dword [esp + 0x4c]
push ecx
mov ecx, esi
call fcn.100138f0
mov edx, dword [esp + 0x58]
add esp, 0x24
push edx
push edi
push 9
call fcn.10035eb0
mov eax, dword [esp + 0x34]
add esp, 0xc
push eax
mov ecx, esi
call fcn.100138f0
add esp, 4
push 0
push edi
push 0x3a
call fcn.10035eb0
add esp, 0xc
mov al, byte [ebp + 4]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
cmp al, 0x74
setne cl
movzx eax, al
mov edi, ebx
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
call fcn.100389f0
add esp, 0xc
test byte [ebp + 6], 8
je 0x10057984
mov edx, dword [ebp]
mov eax, dword [edx]
push 1
push eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
push eax
call fcn.10029510
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10057893
mov dword [esp + 0x10], 7
jmp 0x10057984
xor edi, edi
cmp dword [esp + 0x1c], edi
lea ecx, [esi + 0x14]
mov dword [esp + 0x20], ecx
jle 0x100578ce
push edi
push ebp
push ebx
call fcn.1004f5c0
mov edx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
mov dword [edx], eax
jne 0x100578c0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
mov dword [edx], ecx
add dword [esp + 0x20], 4
add edi, 1
cmp edi, dword [esp + 0x1c]
jl 0x100578a2
mov dword [esp + 0x20], ebp
jmp 0x100578e0
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x2c], 0
add ebx, 0x10
mov eax, dword [ebx]
test eax, eax
jl 0x10057963
mov ecx, dword [esp + 0x78]
cmp dword [ecx + 0x20], eax
jbe 0x1005790c
mov ecx, dword [ecx + 4]
mov edi, dword [esp + 0x1c]
lea edx, [eax + eax*4]
mov dword [ecx + edx*4 + 8], edi
add dword [esi], 1
mov ecx, dword [esp + 0x78]
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x1005793e
cmp byte [edi + 0x40], 0
jne 0x1005793e
lea edx, [eax + eax*4]
movsx eax, byte [ecx + edx*4 + 1]
lea ebp, [ecx + edx*4]
mov ecx, dword [ebp + 0x10]
call fcn.10030230
mov dword [ebp + 0x10], esi
mov byte [ebp + 1], 0xfa
jmp 0x1005794a
mov ecx, esi
mov eax, 0xfffffffa
call fcn.10030230
mov eax, dword [esp + 0x2c]
add eax, 1
mov dword [ebx], 0xffffffff
add ebx, 4
cmp eax, 2
mov dword [esp + 0x2c], eax
jl 0x100578ef
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x34]
test eax, eax
mov dword [esp + 0x20], eax
jne 0x100578e0
add dword [esi], 0xffffffff
jne 0x10057984
push esi
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x24]
test esi, esi
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
je 0x100579b5
mov edi, dword [esp + 0x18]
push esi
push edi
call fcn.10029580
add esp, 8
mov eax, esi
mov ecx, edi
call fcn.10021de0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret