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

Disassembly:
sub esp, 0x64
mov edx, dword [esp + 0x70]
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
push ebx
mov eax, dword [edx]
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov eax, dword [edx + 4]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 8]
push ebp
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0xc]
push esi
mov esi, dword [esp + 0x74]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0x10]
push edi
mov edi, dword [ebx + 0x34]
mov ecx, dword [esi]
mov dword [esp + 0x3c], eax
mov eax, dword [edx + 0x14]
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x30]
mov dword [esp + 0x18], ecx
test eax, eax
jne 0x4798fa
cmp dword [edi + 0x3c], eax
jne 0x4798f6
mov ebp, dword [esi + 8]
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x47925c
cmp dword [esi + 0x74], ebp
jne 0x47924d
test byte [ecx + 0x4c], 8
jne 0x47924d
mov byte [esi + 0x17], 1
push esi
call fcn.004b9430
add esp, 4
mov dword [esp + 0x1c], eax
mov ebp, eax
cmp byte [esp + 0x2c], 0xc
jne 0x47927c
mov eax, dword [ebx + 0x1c]
push dword [eax]
push dword [esp + 0x34]
push 0x64
push ebp
call fcn.004b89e0
add esp, 0x10
mov byte [esp + 0x2c], 0xe
test dword [ebx + 4], 0x400
je 0x4792a8
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
call fcn.0047ac10
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jns 0x4798bb
xor eax, eax
mov dword [esp + 0x14], eax
test dword [ebx + 4], 0x2000
je 0x4792c5
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
call fcn.00473a40
add esp, 0xc
jmp 0x47978a
cmp dword [ebx + 0x30], 0
je 0x4792e5
mov ecx, dword [esp + 0x80]
push ecx
push ebx
push esi
call fcn.004799b0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [edi + 0x34], 0
jne 0x479308
push str.COMPOUND_QUERY
push 1
push esi
call fcn.004bfdb0
push str.LEFT_MOST_SUBQUERY
push 1
push esi
call fcn.004bfdb0
add esp, 0x18
movzx eax, byte [ebx]
sub eax, 0x84
je 0x4795cd
dec eax
je 0x4794bd
dec eax
je 0x4795cd
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.004b89e0
push ebx
mov dword [ebx + 0x14], eax
call fcn.00460420
push dword [esp + 0x24]
push 1
or dword [eax + 4], 0x20
lea eax, [esp + 0x60]
push eax
call fcn.004b2cb0
lea eax, [esp + 0x64]
push eax
push edi
push esi
call fcn.004b0790
mov ecx, eax
add esp, 0x2c
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x4798bb
push eax
push dword [esp + 0x28]
push 0x64
push ebp
call fcn.004b89e0
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x34]
mov ebp, dword [ebx + 0x3c]
mov dword [esp + 0x58], eax
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x3c], 0
call fcn.004870a0
push eax
push str._s_USING_TEMP_B_TREE
push 1
push esi
call fcn.004bfdb0
lea eax, [esp + 0x68]
push eax
push ebx
push esi
call fcn.004b0790
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 0x4793e6
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4793fa
push eax
push dword [esp + 0x1c]
call fcn.00497330
add esp, 8
mov dword [ebx + 0x3c], ebp
mov ebp, dword [esi + 0x38]
dec ebp
push ebp
push dword [esp + 0x80]
lea ebx, [ebp - 1]
push esi
mov dword [esi + 0x38], ebx
call fcn.00459030
mov edi, dword [esp + 0x28]
push ebp
push dword [esp + 0x20]
push 0x25
push edi
call fcn.004b89e0
push esi
call fcn.004a2d30
mov esi, eax
push esi
push dword [esp + 0x34]
push 0x7e
push edi
call fcn.004b89e0
push 0
push esi
push ebx
push dword [esp + 0x60]
mov edi, eax
push 0x1d
push dword [esp + 0x60]
call fcn.004b8b70
add esp, 0x48
push esi
mov esi, dword [esp + 0x7c]
push esi
call fcn.004ae9a0
push ebp
push ebx
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push dword [esp + 0x2c]
push dword [esp + 0x9c]
push esi
call fcn.004864d0
push ebx
mov ebx, dword [esp + 0x48]
push ebx
call fcn.004c30c0
push edi
mov edi, dword [esp + 0x44]
push edi
push 5
push ebx
call fcn.004b89e0
add esp, 0x40
push ebp
mov ebp, ebx
push ebp
call fcn.004c30c0
push 0
lea eax, [edi + 1]
push eax
push 0x74
push ebp
call fcn.004b89e0
push 0
push edi
push 0x74
push ebp
call fcn.004b89e0
jmp 0x479771
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.004b0790
mov ecx, eax
mov dword [ebx + 0x3c], 0
add esp, 0xc
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x4798bb
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 0x479537
push ecx
push 0x14
push ebp
call fcn.004b8980
mov ecx, dword [ebx + 0xc]
add esp, 0xc
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x479537
push ecx
inc ecx
push ecx
push dword [ebx + 8]
push 0x98
push ebp
call fcn.004b8a40
add esp, 0x14
push str.UNION_ALL
push 1
push esi
call fcn.004bfdb0
lea eax, [esp + 0x38]
push eax
push ebx
push esi
call fcn.004b0790
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.004a7260
mov word [ebx + 2], ax
add esp, 0x20
mov ecx, dword [edi + 0x3c]
mov word [esp + 0x10], ax
test ecx, ecx
je 0x4795b2
lea eax, [esp + 0x28]
push eax
push dword [ecx + 0xc]
call fcn.00498090
add esp, 8
test eax, eax
je 0x4795b2
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x4795b2
cdq
push edx
push eax
call fcn.004a71c0
add esp, 8
cmp word [esp + 0x10], ax
jle 0x4795b2
mov word [ebx + 2], ax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x47977b
push eax
push ebp
call fcn.004c0950
add esp, 8
jmp 0x47977b
cmp byte [esp + 0x2c], 1
jne 0x4795de
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], eax
jmp 0x47960a
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.004b89e0
push ebx
mov dword [ebx + 0x14], eax
call fcn.00460420
add esp, 0x14
or dword [eax + 4], 0x20
mov eax, dword [esp + 0x10]
push eax
lea eax, [esp + 0x60]
push 1
push eax
call fcn.004b2cb0
lea eax, [esp + 0x68]
push eax
push edi
push esi
call fcn.004b0790
mov ecx, eax
add esp, 0x18
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x4798bb
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 + 0x5c], al
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x3c], ecx
call fcn.004870a0
push eax
push str._s_USING_TEMP_B_TREE
push 1
push esi
call fcn.004bfdb0
lea eax, [esp + 0x70]
push eax
push ebx
push esi
call fcn.004b0790
mov dword [esp + 0x34], eax
add esp, 0x20
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x47968b
push eax
push dword [esp + 0x1c]
call fcn.0045f150
add esp, 8
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 0x4796b7
movzx eax, word [edi + 2]
push eax
movzx eax, word [ebx + 2]
push eax
call fcn.004a7260
add esp, 8
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
mov edi, dword [esp + 0x18]
test eax, eax
je 0x4796cc
push eax
push edi
call fcn.00497330
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 0x47977b
cmp byte [edi + 0x51], 0
jne 0x47977b
mov ebx, dword [esi + 0x38]
dec ebx
push ebx
push dword [esp + 0x80]
lea edi, [ebx - 1]
push esi
mov dword [esi + 0x38], edi
call fcn.00459030
push ebx
push dword [esp + 0x20]
push 0x25
push ebp
call fcn.004b89e0
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 + 0xb0]
push dword [esp + 0xb0]
call fcn.004864d0
push edi
push ebp
call fcn.004c30c0
add esp, 0x44
push esi
mov esi, dword [esp + 0x14]
push esi
push 5
push ebp
call fcn.004b89e0
push ebx
push ebp
call fcn.004c30c0
push 0
push esi
push 0x74
push ebp
call fcn.004b89e0
mov esi, dword [esp + 0xa0]
mov ebx, dword [esp + 0xa4]
add esp, 0x28
cmp dword [ebx + 0x38], 0
jne 0x47978a
push esi
call fcn.004bfe40
add esp, 4
cmp dword [esi + 0x24], 0
jne 0x4798bb
test byte [ebx + 4], 0x20
mov edi, dword [esp + 0x18]
je 0x47994a
mov eax, dword [ebx + 0x1c]
push 1
mov eax, dword [eax]
push eax
push edi
mov dword [esp + 0x30], eax
call fcn.004a5d00
mov esi, eax
add esp, 0xc
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4797c9
lea ebx, [eax + 7]
jmp 0x4798c3
cmp dword [esp + 0x24], 0
lea edi, [esi + 0x14]
jle 0x479810
mov ebp, dword [esp + 0x78]
xor esi, esi
lea esp, [esp]
push esi
push ebx
push ebp
call fcn.00479960
add esp, 0xc
mov dword [edi], eax
test eax, eax
jne 0x4797fa
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 0x4797e0
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
lea esp, [esp]
lea edi, [ebx + 0x14]
mov dword [esp + 0x78], 0
mov ebx, dword [esp + 0x24]
nop
mov edx, dword [edi]
test edx, edx
js 0x479898
mov eax, dword [ebp]
cmp byte [eax + 0x51], 0
je 0x479836
mov eax, 0x50e22c
jmp 0x47983f
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 0x47985b
push esi
push 0xfffffffffffffff7
push eax
call fcn.00462150
add esp, 0xc
jmp 0x479881
mov eax, dword [ebp + 0x68]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x47987a
push 0xfffffffffffffff7
push esi
push eax
push ebp
call fcn.004d0560
add esp, 0x10
jmp 0x479881
mov dword [eax + 0x10], esi
mov byte [eax + 1], 0xf7
mov eax, dword [esp + 0x78]
inc eax
mov dword [edi], 0xffffffff
add edi, 4
mov dword [esp + 0x78], eax
cmp eax, 2
jl 0x479820
mov ebx, dword [esp + 0x7c]
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x7c], ebx
test ebx, ebx
jne 0x479810
dec dword [esi]
jne 0x4798bb
push esi
push dword [esi + 0xc]
call fcn.00491cd0
add esp, 8
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x34]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x38]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4798ec
push 1
push eax
push edi
call fcn.00456a20
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x64
ret
test eax, eax
je 0x479901
mov ecx, str.ORDER_BY
jmp 0x479906
mov ecx, str.LIMIT
movzx eax, byte [ebx]
sub eax, 0x85
je 0x47992b
dec eax
je 0x479924
dec eax
je 0x47991d
mov eax, str.UNION
jmp 0x479930
mov eax, str.INTERSECT
jmp 0x479930
mov eax, str.EXCEPT
jmp 0x479930
mov eax, str.UNION_ALL
push eax
push ecx
push str._s_clause_should_come_after__s_not_before
push esi
call fcn.00493e20
add esp, 0x10
mov ebx, 1
jmp 0x4798bf
mov ebx, dword [esp + 0x14]
jmp 0x4798c3