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

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
mov esi, dword [esp + 0x28]
xor ebp, ebp
mov edx, dword [ebx]
mov dword [esp + 0x1c], edx
test esi, esi
je 0x4a66d9
cmp dword [esp + 0x2c], ebp
jne 0x4a66ea
push dword [esp + 0x30]
push str.ORDER_BY_without_LIMIT_on__s
push ebx
call fcn.00493e20
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x4a66c5
push eax
push dword [ebx]
call fcn.00497330
add esp, 8
push esi
push dword [ebx]
call fcn.0045f150
add esp, 8
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp dword [esp + 0x2c], ebp
jne 0x4a66ea
mov eax, dword [esp + 0x24]
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov esi, dword [esp + 0x20]
push edi
mov esi, dword [esi + 0x18]
mov dword [esp + 0x10], esi
test byte [esi + 0x24], 0x80
jne 0x4a67a5
push 0
push 0x34
push edx
call fcn.00491d60
mov edi, eax
add esp, 0xc
test edi, edi
je 0x4a674b
push 0x34
push 0
push edi
call sub.MSVCRT.dll_memset
or ebp, 0xffffffff
mov byte [edi], 0x4b
push edi
mov word [edi + 0x22], bp
call fcn.0045f7c0
mov eax, dword [ebx]
add esp, 0x10
mov eax, dword [eax + 0x78]
cmp dword [edi + 0x18], eax
jle 0x4a674e
push eax
push str.Expression_tree_is_too_large__maximum_depth__d_
push ebx
call fcn.00493e20
add esp, 0xc
jmp 0x4a674e
or ebp, 0xffffffff
push 0
push 0x34
push dword [ebx]
call fcn.00491d60
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4a6795
push 0x34
push 0
push esi
call sub.MSVCRT.dll_memset
push esi
mov byte [esi], 0x4b
mov word [esi + 0x22], bp
call fcn.0045f7c0
mov eax, dword [ebx]
add esp, 0x10
mov eax, dword [eax + 0x78]
cmp dword [esi + 0x18], eax
jle 0x4a6795
push eax
push str.Expression_tree_is_too_large__maximum_depth__d_
push ebx
call fcn.00493e20
add esp, 0xc
push esi
push 0
push ebx
call fcn.004981a0
mov ebp, eax
jmp 0x4a68bd
push esi
call fcn.004ae020
mov edi, eax
add esp, 4
movzx ecx, word [edi + 0x32]
cmp ecx, 1
jne 0x4a67f2
mov eax, dword [edi + 4]
movsx eax, word [eax]
lea ecx, [eax + eax*4]
mov eax, dword [esi + 4]
mov esi, dword [eax + ecx*4]
push esi
push 0x3b
push edx
call fcn.004940b0
push esi
push 0x3b
push dword [esp + 0x34]
mov edi, eax
call fcn.004940b0
push eax
push 0
push ebx
call fcn.004981a0
add esp, 0x24
mov ebp, eax
jmp 0x4a68c0
xor eax, eax
xor esi, esi
cmp ax, cx
jae 0x4a6860
jmp 0x4a6800
mov eax, dword [edi + 4]
movsx eax, word [eax + esi*2]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ecx*4]
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x4a6833
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a6820
sub ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 0x3fffffff
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], ecx
push eax
push 0x3b
push edx
call fcn.00494250
push eax
push ebp
push ebx
call fcn.004981a0
mov edx, dword [esp + 0x3c]
mov ebp, eax
movzx eax, word [edi + 0x32]
inc esi
add esp, 0x1c
cmp esi, eax
jl 0x4a6800
push 0
push 0x34
push dword [ebx]
call fcn.00491d60
mov edi, eax
add esp, 0xc
test edi, edi
je 0x4a68c0
push 0x34
push 0
push edi
call sub.MSVCRT.dll_memset
or eax, 0xffffffff
mov byte [edi], 0xae
push edi
mov word [edi + 0x22], ax
call fcn.0045f7c0
mov eax, dword [ebx]
add esp, 0x10
mov eax, dword [eax + 0x78]
cmp dword [edi + 0x18], eax
jle 0x4a68aa
push eax
push str.Expression_tree_is_too_large__maximum_depth__d_
push ebx
call fcn.00493e20
add esp, 0xc
test edi, edi
je 0x4a68c0
push 0
push ebp
push dword [esp + 0x28]
call fcn.00498490
mov dword [edi + 0x14], eax
add esp, 0xc
mov esi, dword [esp + 0x24]
push 0
push esi
mov dword [esi + 0x18], 0
push dword [ebx]
call fcn.004b3a90
push dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
push 0
push dword [esp + 0x40]
mov dword [esi + 0x18], ecx
push 0
push 0
push dword [esp + 0x48]
mov dword [esi + 0x4c], 0
push eax
push ebp
push ebx
call fcn.004b2f20
push 0
push 0x34
push dword [ebx]
mov ebp, eax
call fcn.00491d60
mov esi, eax
add esp, 0x3c
test esi, esi
je 0x4a6960
push 0x34
push 0
push esi
call sub.MSVCRT.dll_memset
or eax, 0xffffffff
mov byte [esi], 0x31
add esp, 0xc
mov word [esi + 0x22], ax
test edi, edi
je 0x4a693c
mov dword [esi + 0xc], edi
mov eax, dword [edi + 4]
and eax, 0x200104
or dword [esi + 4], eax
push esi
call fcn.0045f7c0
mov eax, dword [ebx]
add esp, 4
mov eax, dword [eax + 0x78]
cmp dword [esi + 0x18], eax
jle 0x4a696f
push eax
push str.Expression_tree_is_too_large__maximum_depth__d_
push ebx
call fcn.00493e20
add esp, 0xc
jmp 0x4a696f
test edi, edi
je 0x4a696f
push edi
push dword [ebx]
call fcn.00497330
add esp, 8
push ebp
push esi
push ebx
call fcn.004a8890
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret