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

Disassembly:
sub esp, 0x70
push ebx
mov ebx, dword [esp + 0x7c]
xor eax, eax
push ebp
push esi
mov esi, dword [esp + 0x88]
mov ecx, dword [ebx + 0x34]
mov dword [esp + 0x20], ecx
mov ecx, 7
push edi
lea edi, [esp + 0x2c]
mov dword [esp + 0x14], eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x84]
mov ecx, dword [edi + 0x30]
mov edx, dword [eax]
mov dword [esp + 0x18], edx
test ecx, ecx
jne 0x494c40
cmp dword [edi + 0x3c], ecx
jne 0x494c3c
mov esi, eax
mov ebp, dword [esi + 8]
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x49459e
cmp dword [esi + 0x74], ebp
jne 0x49458f
test byte [edx + 0x4c], 8
jne 0x49458f
mov byte [esi + 0x17], 1
push esi
call fcn.004d54b0
add esp, 4
mov dword [esp + 0x1c], eax
mov ebp, eax
cmp byte [esp + 0x2c], 0xc
jne 0x4945be
mov eax, dword [ebx + 0x1c]
push dword [eax]
push dword [esp + 0x34]
push 0x64
push ebp
call fcn.004d4a60
add esp, 0x10
mov byte [esp + 0x2c], 0xe
test dword [ebx + 4], 0x400
je 0x4945ea
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
call fcn.00495f80
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jns 0x494c01
xor eax, eax
mov dword [esp + 0x14], eax
test dword [ebx + 4], 0x2000
je 0x494607
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
call fcn.0048ecf0
add esp, 0xc
jmp 0x494ace
cmp dword [ebx + 0x30], 0
je 0x494626
push dword [esp + 0x8c]
push ebx
push esi
call fcn.00494cf0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
cmp dword [edi + 0x34], 0
jne 0x494649
push str.COMPOUND_QUERY
push 1
push esi
call fcn.004dc4f0
push str.LEFT_MOST_SUBQUERY
push 1
push esi
call fcn.004dc4f0
add esp, 0x18
movzx eax, byte [ebx]
sub eax, 0x84
je 0x494925
dec eax
je 0x494815
dec eax
je 0x494925
mov ecx, dword [esi + 0x28]
push 0
push ecx
push 0x64
lea eax, [ecx + 1]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], eax
inc eax
push ebp
mov dword [esi + 0x28], eax
call fcn.004d4a60
push ebx
mov dword [ebx + 0x14], eax
call fcn.0047b440
push dword [esp + 0x24]
push 1
or dword [eax + 4], 0x20
lea eax, [esp + 0x64]
push eax
call fcn.004ce810
lea eax, [esp + 0x68]
push eax
push edi
push esi
call fcn.004cc380
mov ecx, eax
add esp, 0x2c
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x494c01
push eax
push dword [esp + 0x28]
push 0x64
push ebp
call fcn.004d4a60
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x5c], eax
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x3c], 0
call fcn.004a2450
push eax
push str._s_USING_TEMP_B_TREE
push 1
push esi
call fcn.004dc4f0
lea eax, [esp + 0x6c]
push eax
push ebx
push esi
call fcn.004cc380
mov dword [esp + 0x44], eax
add esp, 0x30
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x20], eax
mov dword [ebx + 0x34], edi
movzx eax, word [edi + 2]
cmp word [ebx + 2], ax
jle 0x49472b
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x49473f
push eax
push dword [esp + 0x1c]
call fcn.004b2a40
add esp, 8
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x3c], eax
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x494abf
mov ebp, dword [esi + 0x38]
dec ebp
push ebp
push dword [esp + 0x8c]
lea ebx, [ebp - 1]
push esi
mov dword [esi + 0x38], ebx
call fcn.00474150
mov edi, dword [esp + 0x28]
push ebp
push dword [esp + 0x20]
push 0x25
push edi
call fcn.004d4a60
push esi
call fcn.004be520
mov esi, eax
push esi
push dword [esp + 0x34]
push 0x7e
push edi
call fcn.004d4a60
push 0
push esi
push ebx
push dword [esp + 0x60]
mov edi, eax
push 0x1d
push dword [esp + 0x60]
call fcn.004d4bf0
add esp, 0x48
push esi
mov esi, dword [esp + 0x88]
push esi
call fcn.004ca580
push ebp
push ebx
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push dword [esp + 0x2c]
push dword [esp + 0xa8]
push esi
call fcn.004a1850
push ebx
mov ebx, dword [esp + 0x48]
push ebx
call fcn.004df7c0
push edi
mov edi, dword [esp + 0x44]
push edi
push 5
push ebx
call fcn.004d4a60
add esp, 0x40
push ebp
mov ebp, ebx
push ebp
call fcn.004df7c0
push 0
lea eax, [edi + 1]
push eax
push 0x74
push ebp
call fcn.004d4a60
push 0
push edi
push 0x74
push ebp
call fcn.004d4a60
jmp 0x494ab5
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x3c]
mov dword [edi + 0x3c], eax
lea eax, [esp + 0x2c]
push eax
push edi
push esi
call fcn.004cc380
mov ecx, eax
mov dword [ebx + 0x3c], 0
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x494c01
mov dword [ebx + 0x34], eax
mov ecx, dword [edi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
test ecx, ecx
je 0x49488f
push ecx
push 0x14
push ebp
call fcn.004d4a00
mov ecx, dword [ebx + 0xc]
add esp, 0xc
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x49488f
push ecx
inc ecx
push ecx
push dword [ebx + 8]
push 0x98
push ebp
call fcn.004d4ac0
add esp, 0x14
push str.UNION_ALL
push 1
push esi
call fcn.004dc4f0
lea eax, [esp + 0x38]
push eax
push ebx
push esi
call fcn.004cc380
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x38], eax
mov dword [ebx + 0x34], edi
movzx eax, word [edi + 2]
push eax
movzx eax, word [ebx + 2]
push eax
call fcn.004c2c50
mov word [ebx + 2], ax
add esp, 0x20
mov ecx, dword [edi + 0x3c]
mov word [esp + 0x10], ax
test ecx, ecx
je 0x49490a
lea eax, [esp + 0x28]
push eax
push dword [ecx + 0xc]
call fcn.004b37a0
add esp, 8
test eax, eax
je 0x49490a
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x49490a
cdq
push edx
push eax
call fcn.004c2bb0
add esp, 8
cmp word [esp + 0x10], ax
jle 0x49490a
mov word [ebx + 2], ax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x494abf
push eax
push ebp
call fcn.004dd090
add esp, 8
jmp 0x494abf
cmp byte [esp + 0x2c], 1
jne 0x494936
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], eax
jmp 0x494962
mov ecx, dword [esi + 0x28]
push 0
push ecx
push 0x64
lea eax, [ecx + 1]
mov dword [esp + 0x1c], ecx
push ebp
mov dword [esi + 0x28], eax
call fcn.004d4a60
push ebx
mov dword [ebx + 0x14], eax
call fcn.0047b440
add esp, 0x14
or dword [eax + 4], 0x20
mov eax, dword [esp + 0x10]
push eax
lea eax, [esp + 0x68]
push 1
push eax
call fcn.004ce810
lea eax, [esp + 0x70]
push eax
push edi
push esi
call fcn.004cc380
mov ecx, eax
add esp, 0x18
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x494c01
cmp byte [ebx], 0x86
mov edx, dword [ebx + 0x3c]
sete al
mov dword [ebx + 0x34], ecx
inc al
mov dword [esp + 0x28], edx
mov byte [esp + 0x64], al
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x3c], ecx
call fcn.004a2450
push eax
push str._s_USING_TEMP_B_TREE
push 1
push esi
call fcn.004dc4f0
lea eax, [esp + 0x78]
push eax
push ebx
push esi
call fcn.004cc380
add esp, 0x20
mov dword [esp + 0x14], eax
cmp byte [ebx], 0x84
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x20], eax
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x30], 0
jne 0x4949fb
movzx eax, word [edi + 2]
push eax
movzx eax, word [ebx + 2]
push eax
call fcn.004c2c50
add esp, 8
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
mov edi, dword [esp + 0x18]
test eax, eax
je 0x494a10
push eax
push edi
call fcn.004b2a40
add esp, 8
cmp byte [esp + 0x2c], 1
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x3c], eax
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
je 0x494abf
cmp byte [edi + 0x51], 0
jne 0x494abf
mov ebx, dword [esi + 0x38]
dec ebx
push ebx
push dword [esp + 0x8c]
lea edi, [ebx - 1]
push esi
mov dword [esi + 0x38], edi
call fcn.00474150
push ebx
push dword [esp + 0x20]
push 0x25
push ebp
call fcn.004d4a60
mov esi, dword [ebp + 0x6c]
lea eax, [esp + 0x48]
push ebx
push edi
push eax
push 0
push 0
push dword [esp + 0x40]
push dword [esp + 0xbc]
push dword [esp + 0xbc]
call fcn.004a1850
push edi
push ebp
call fcn.004df7c0
add esp, 0x44
push esi
mov esi, dword [esp + 0x14]
push esi
push 5
push ebp
call fcn.004d4a60
push ebx
push ebp
call fcn.004df7c0
push 0
push esi
push 0x74
push ebp
call fcn.004d4a60
mov esi, dword [esp + 0xac]
mov ebx, dword [esp + 0xb0]
add esp, 0x28
cmp dword [ebx + 0x38], 0
jne 0x494ace
push esi
call fcn.004dc580
add esp, 4
cmp dword [esi + 0x24], 0
jne 0x494c01
test byte [ebx + 4], 0x20
mov edi, dword [esp + 0x18]
je 0x494c91
mov eax, dword [ebx + 0x1c]
push 1
mov eax, dword [eax]
push eax
push edi
mov dword [esp + 0x30], eax
call fcn.004c16f0
mov esi, eax
add esp, 0xc
mov dword [esp + 0x10], esi
test esi, esi
jne 0x494b0d
lea ebx, [eax + 7]
jmp 0x494c09
cmp dword [esp + 0x24], 0
lea edi, [esi + 0x14]
jle 0x494b50
mov ebp, dword [esp + 0x84]
xor esi, esi
push esi
push ebx
push ebp
call fcn.00494ca0
add esp, 0xc
mov dword [edi], eax
test eax, eax
jne 0x494b3a
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 8]
mov dword [edi], eax
inc esi
add edi, 4
cmp esi, dword [esp + 0x24]
jl 0x494b20
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
lea esp, [esp]
lea edi, [ebx + 0x14]
mov dword [esp + 0x1c], 0
mov ebx, dword [esp + 0x24]
nop
mov edx, dword [edi]
test edx, edx
js 0x494bd8
mov eax, dword [ebp]
cmp byte [eax + 0x51], 0
je 0x494b76
mov eax, 0x530d04
jmp 0x494b7f
mov eax, dword [ebp + 0x68]
lea ecx, [edx + edx*4]
lea eax, [eax + ecx*4]
mov dword [eax + 8], ebx
inc dword [esi]
mov eax, dword [ebp]
cmp byte [eax + 0x51], 0
je 0x494b9b
push esi
push 0xfffffffffffffff7
push eax
call fcn.0047d1f0
add esp, 0xc
jmp 0x494bc1
mov eax, dword [ebp + 0x68]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x494bba
push 0xfffffffffffffff7
push esi
push eax
push ebp
call fcn.004ed1b0
add esp, 0x10
jmp 0x494bc1
mov dword [eax + 0x10], esi
mov byte [eax + 1], 0xf7
mov eax, dword [esp + 0x1c]
inc eax
mov dword [edi], 0xffffffff
add edi, 4
mov dword [esp + 0x1c], eax
cmp eax, 2
jl 0x494b60
mov ebx, dword [esp + 0x88]
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x88], ebx
test ebx, ebx
jne 0x494b50
dec dword [esi]
jne 0x494c01
push esi
push dword [esi + 0xc]
call fcn.004ad230
add esp, 8
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x38]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 0x10], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x494c32
push 1
push eax
push edi
call fcn.00471af0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x70
ret
test ecx, ecx
je 0x494c47
mov edx, str.ORDER_BY
jmp 0x494c4c
mov edx, str.LIMIT
movzx ecx, byte [ebx]
sub ecx, 0x85
je 0x494c72
dec ecx
je 0x494c6b
dec ecx
je 0x494c64
mov ecx, str.UNION
jmp 0x494c77
mov ecx, str.INTERSECT
jmp 0x494c77
mov ecx, str.EXCEPT
jmp 0x494c77
mov ecx, str.UNION_ALL
push ecx
push edx
push str._s_clause_should_come_after__s_not_before
push eax
call fcn.004af3d0
add esp, 0x10
mov ebx, 1
jmp 0x494c05
mov ebx, dword [esp + 0x14]
jmp 0x494c09