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

Disassembly:
sub esp, 0x38
push ebx
mov ebx, dword [esp + 0x40]
push ebp
mov ebp, dword [ebx + 8]
push esi
or esi, 0xffffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], 0
test ebp, ebp
jne 0x514588
push ebx
call fcn.004d6270
mov ebp, eax
add esp, 4
mov dword [ebx + 8], eax
test ebp, ebp
je 0x514566
push 0
push 0
push 0
push 0x9f
push ebp
call fcn.004cf760
add esp, 0x14
cmp dword [ebx + 0x19c], 0
jne 0x51457b
mov eax, dword [ebx]
test byte [eax + 0x3c], 8
jne 0x51457b
mov byte [ebx + 0x17], 1
test ebp, ebp
jne 0x514588
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret
mov ecx, dword [esp + 0x4c]
inc dword [ebx + 0x68]
test byte [ecx + 4], 0x20
jne 0x5145a2
mov esi, ebx
call fcn.004db800
mov esi, eax
mov dword [esp + 0x14], eax
cmp byte [ebx + 0x1c1], 2
push edi
jne 0x51465a
mov edx, dword [esp + 0x50]
cmp byte [edx], 0x4b
mov ecx, str.LIST
je 0x5145c3
mov ecx, str.SCALAR
mov eax, 0x59603e
test esi, esi
jge 0x5145d1
mov eax, str.CORRELATED
mov edx, dword [ebx + 0x1d4]
mov esi, dword [ebx]
push edx
push ecx
push eax
push str.EXECUTE__s_s_SUBQUERY__d
call fcn.004e0090
push 0
mov edi, eax
mov eax, dword [ebx + 0x1d0]
push 0
push eax
push 0xa2
push ebp
call fcn.004cf760
mov esi, dword [ebp + 4]
mov ecx, dword [ebp]
add esp, 0x24
test esi, esi
je 0x51464c
cmp byte [ecx + 0x41], 0
jne 0x51464c
test eax, eax
jge 0x514619
mov eax, dword [ebp + 0x20]
dec eax
lea eax, [eax + eax*4]
lea esi, [esi + eax*4]
movsx eax, byte [esi + 1]
push ecx
mov ecx, dword [esi + 0x10]
call fcn.004cf9f0
add esp, 4
mov dword [esi + 0x10], 0
test edi, edi
jne 0x514643
mov dword [esi + 0x10], edi
mov byte [esi + 1], 0
jmp 0x51465a
mov dword [esi + 0x10], edi
mov byte [esi + 1], 0xff
jmp 0x51465a
push ecx
mov ecx, edi
or eax, 0xffffffff
call fcn.004cf9f0
add esp, 4
mov ecx, dword [esp + 0x50]
cmp byte [ecx], 0x4b
je 0x51474c
mov edi, dword [ecx + 0x14]
inc dword [ebx + 0x48]
mov eax, dword [ebx + 0x48]
xor edx, edx
cmp byte [ecx], 0x77
push edx
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], eax
mov byte [esp + 0x3d], 0
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edx
push edx
jne 0x51469c
mov byte [esp + 0x40], 0xa
mov dword [esp + 0x48], eax
push 0x1a
jmp 0x5146a3
mov byte [esp + 0x40], 3
push 0x17
push ebp
call fcn.004cf760
mov edx, dword [edi + 0x3c]
mov eax, dword [ebx]
add esp, 0x14
push edx
push eax
call fcn.004d15b0
mov ecx, dword [ebx]
push 1
push 0x58a9d8
push 0x84
push ecx
call fcn.004d7780
mov esi, eax
mov eax, dword [ebx]
add esp, 0x18
mov dword [esp + 0x4c], eax
test esi, esi
jne 0x5146f2
push esi
push eax
call fcn.004d15b0
mov edx, dword [esp + 0x54]
push esi
push edx
call fcn.004d15b0
add esp, 0x10
jmp 0x514715
call fcn.004d14b0
mov eax, dword [ebx]
mov eax, dword [eax + 0x64]
cmp dword [esi + 0x18], eax
jle 0x514715
push eax
push str.Expression_tree_is_too_large__maximum_depth__d_
mov edi, ebx
call fcn.004e0360
mov edi, dword [esp + 0x30]
add esp, 8
lea edx, [esp + 0x34]
push edx
mov ecx, 0xfdff
and word [edi + 6], cx
push edi
push ebx
mov dword [edi + 0x3c], esi
mov dword [edi + 8], 0
call fcn.0050f700
add esp, 0xc
test eax, eax
jne 0x5147fb
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], eax
jmp 0x514abb
mov esi, ecx
mov eax, dword [esi + 0xc]
call fcn.004d7600
mov ecx, dword [ebx + 0x44]
mov edi, dword [esp + 0x58]
mov dword [esi + 0x1c], ecx
inc dword [ebx + 0x44]
xor edx, edx
test edi, edi
sete dl
push 0
mov byte [esp + 0x50], al
mov eax, dword [esi + 0x1c]
push edx
push eax
push 0x3a
push ebp
call fcn.004cf760
add esp, 0x14
mov dword [esp + 0x30], eax
test edi, edi
je 0x514792
mov dword [esp + 0x14], 0
jmp 0x5147a5
mov eax, dword [ebx]
push 1
push 1
push eax
call fcn.004d8ec0
add esp, 0xc
mov dword [esp + 0x14], eax
test dword [esi + 4], 0x800
je 0x514826
mov edi, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
mov dl, byte [esp + 0x4c]
lea eax, [esp + 0x34]
push eax
xor esi, esi
push edi
mov byte [esp + 0x3c], 0xb
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov byte [esp + 0x3d], dl
push ebx
mov dword [edi + 8], esi
call fcn.0050f700
add esp, 0xc
test eax, eax
je 0x514805
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x5147fb
add dword [eax], 0xffffffff
jne 0x5147fb
push eax
call fcn.004bf5d0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret
mov edi, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x50]
mov edi, dword [ecx]
mov ecx, dword [edx + 0xc]
mov esi, ebx
call fcn.004f0ff0
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x14], eax
jmp 0x514a5f
mov esi, dword [esi + 0x14]
test esi, esi
je 0x514a5f
cmp byte [esp + 0x4c], 0
jne 0x51483d
mov byte [esp + 0x4c], 0x41
mov edi, dword [esp + 0x14]
test edi, edi
je 0x514858
mov edx, dword [esp + 0x50]
mov ecx, dword [edx + 0xc]
push ebx
call fcn.004f0ea0
add esp, 4
mov dword [edi + 0x14], eax
mov eax, ebx
call fcn.004c7150
mov dword [esp + 0x24], eax
mov eax, ebx
call fcn.004c7150
cmp dword [esp + 0x58], 0
mov dword [esp + 0x10], eax
je 0x514885
push 0
push eax
push 0
push 0x1a
push ebp
call fcn.004cf760
add esp, 0x14
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
test eax, eax
jle 0x514a01
lea ebx, [ebx]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov esi, dword [edx]
test edi, edi
jl 0x5148cc
push esi
call fcn.004d1b10
add esp, 4
test eax, eax
jne 0x5148cc
mov eax, edi
mov ecx, ebp
call fcn.004cfb90
mov dword [esp + 0x18], 0xffffffff
cmp dword [esp + 0x58], 0
je 0x514907
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.004c6b80
add esp, 8
test eax, eax
je 0x514907
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [eax + 0x1c]
push edx
push ecx
push 0x62
push ebp
call fcn.004cf760
add esp, 0x14
jmp 0x5149eb
mov edx, dword [esp + 0x24]
push edx
push esi
push ebx
call fcn.0051ab60
add esp, 0xc
cmp dword [esp + 0x58], 0
mov edi, eax
je 0x51494f
mov eax, dword [ebp + 0x20]
push 0
add eax, 2
push eax
push edi
push 0x27
push ebp
call fcn.004cf760
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x64]
mov eax, dword [edx + 0x1c]
push edi
push ecx
push eax
push 0x5f
push ebp
call fcn.004cf760
add esp, 0x28
jmp 0x5149eb
mov ecx, dword [esp + 0x10]
push ecx
push 1
push edi
push 0x32
push ebp
call fcn.004cf760
mov esi, dword [ebp + 4]
mov ecx, dword [ebp]
add esp, 0x14
test esi, esi
je 0x5149b2
cmp byte [ecx + 0x41], 0
jne 0x5149b2
test eax, eax
jge 0x51497a
mov eax, dword [ebp + 0x20]
dec eax
lea edx, [eax + eax*4]
movsx eax, byte [esi + edx*4 + 1]
lea esi, [esi + edx*4]
push ecx
mov ecx, dword [esi + 0x10]
call fcn.004cf9f0
push 0
lea eax, [esp + 0x54]
mov dword [esi + 0x10], 0
mov edx, dword [ebp]
push 1
push eax
call fcn.004cbb70
add esp, 0x10
mov dword [esi + 0x10], eax
mov byte [esi + 1], 0xff
jmp 0x5149c4
push ecx
lea ecx, [esp + 0x50]
mov eax, 1
call fcn.004cf9f0
add esp, 4
push edi
mov eax, 1
mov esi, ebx
call fcn.004c6f00
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
mov eax, dword [edx + 0x1c]
push 0
push ecx
push eax
push 0x70
push ebp
call fcn.004cf760
add esp, 0x18
mov eax, dword [esp + 0x20]
add dword [esp + 0x1c], 0x18
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jg 0x5148a0
mov esi, dword [esp + 0x24]
test esi, esi
je 0x514a32
mov dl, byte [ebx + 0x13]
cmp dl, 8
jae 0x514a32
xor eax, eax
lea ecx, [ebx + 0x78]
cmp dword [ecx + 0xc], esi
je 0x514a9f
inc eax
add ecx, 0x14
cmp eax, 0xa
jl 0x514a16
movzx ecx, dl
mov dword [ebx + ecx*4 + 0x18], esi
inc byte [ebx + 0x13]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x514a5f
mov dl, byte [ebx + 0x13]
cmp dl, 8
jae 0x514a5f
xor eax, eax
lea ecx, [ebx + 0x78]
cmp dword [ecx + 0xc], esi
je 0x514aa5
inc eax
add ecx, 0x14
cmp eax, 0xa
jl 0x514a47
movzx edx, dl
mov dword [ebx + edx*4 + 0x18], esi
inc byte [ebx + 0x13]
mov edi, dword [esp + 0x14]
test edi, edi
je 0x514abb
mov ecx, dword [ebp + 4]
mov eax, dword [esp + 0x30]
mov edx, dword [ebp]
test ecx, ecx
je 0x514aab
cmp byte [edx + 0x41], 0
jne 0x514aab
test eax, eax
jge 0x514a83
mov eax, dword [ebp + 0x20]
dec eax
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
movsx eax, byte [esi + 1]
mov ecx, dword [esi + 0x10]
push edx
call fcn.004cf9f0
mov dword [esi + 0x10], edi
mov byte [esi + 1], 0xfa
jmp 0x514ab8
mov byte [ecx + 6], 1
jmp 0x514a32
mov byte [ecx + 6], 1
jmp 0x514a5f
push edx
mov ecx, edi
mov eax, 0xfffffffa
call fcn.004cf9f0
add esp, 4
cmp dword [esp + 0x54], 0
je 0x514ad9
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 0x1c]
push ecx
push eax
mov esi, ebp
call fcn.004d1c90
add esp, 8
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x514b0a
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x18]
dec ecx
mov dword [edx + 0x5c], ecx
mov edx, dword [ebp]
cmp byte [edx + 0x41], 0
mov ecx, dword [ebp + 0x20]
je 0x514afe
mov eax, 0x5a2838
jmp 0x514b07
mov edx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 8], ecx
mov eax, ebx
call fcn.004c6f60
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret