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

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x5c]
mov edx, dword [eax]
push ebx
push ebp
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x28], edx
mov edx, dword [eax + 4]
push esi
mov esi, dword [esp + 0x60]
mov ecx, dword [esi]
mov dword [esp + 0x30], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
cmp dword [ecx + 0x18], 0
push edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], ecx
je 0x4b6920
movzx eax, byte [ebp + 4]
sub eax, 0x71
je 0x4b6901
sub eax, 1
je 0x4b68fa
sub eax, 1
je 0x4b68f3
mov eax, str.UNION
jmp 0x4b6906
mov eax, str.INTERSECT
jmp 0x4b6906
mov eax, str.EXCEPT
jmp 0x4b6906
mov eax, str.UNION_ALL
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
mov edi, esi
call fcn.00476d80
add esp, 8
mov edi, 1
jmp 0x4b71c5
cmp dword [ecx + 0x28], 0
je 0x4b696d
movzx eax, byte [ebp + 4]
sub eax, 0x71
je 0x4b694e
sub eax, 1
je 0x4b6947
sub eax, 1
je 0x4b6940
mov eax, str.UNION
jmp 0x4b6953
mov eax, str.INTERSECT
jmp 0x4b6953
mov eax, str.EXCEPT
jmp 0x4b6953
mov eax, str.UNION_ALL
push eax
push str.LIMIT_clause_should_come_after__s_not_before
mov edi, esi
call fcn.00476d80
add esp, 8
mov edi, 1
jmp 0x4b71c5
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x4b6993
mov eax, dword [esp + 0x10]
call fcn.0048d5c0
mov ebx, eax
mov dword [esi + 0xc], eax
test ebx, ebx
je 0x4b6993
push 0x88
call fcn.0048d790
add esp, 4
mov dl, byte [esp + 0x30]
cmp dl, 9
jne 0x4b69cd
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [esp + 0x34]
push 0
push edx
push eax
push 0x29
mov eax, ebx
call fcn.0048d730
mov eax, dword [ebx + 0x14]
add esp, 0x10
test eax, eax
je 0x4b69c7
mov ecx, dword [ebx + 0xc]
lea ecx, [ecx + ecx*4]
mov byte [eax + ecx*4 - 0x11], 0x10
mov dl, 8
mov byte [esp + 0x30], dl
mov eax, dword [esp + 0x14]
mov edi, dword [ebp]
mov ecx, dword [eax]
mov edi, dword [edi]
cmp edi, dword [ecx]
je 0x4b69ff
movzx eax, byte [ebp + 4]
call fcn.004b5470
push eax
push str.SELECTs_to_the_left_and_right_of__s_do_not_have_the_same_number_of_result_columns
mov edi, esi
call fcn.00476d80
add esp, 8
mov edi, 1
jmp 0x4b71c5
cmp dword [ebp + 0x18], 0
je 0x4b6a1c
mov edx, dword [esp + 0x6c]
push edx
push ebp
push esi
call fcn.004b7630
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
movzx ecx, byte [ebp + 4]
sub ecx, 0x70
je 0x4b6e58
sub ecx, 1
je 0x4b6d25
sub ecx, 1
je 0x4b6e58
mov edx, dword [esi + 0x44]
lea eax, [edx + 1]
mov dword [esp + 0x20], eax
inc eax
mov dword [esi + 0x44], eax
mov ecx, dword [ebx + 0xc]
cmp dword [ebx + 0x10], ecx
mov dword [esp + 0x68], edx
mov dword [esp + 0x24], ecx
jg 0x4b6a73
mov edi, ebx
call fcn.0048d6b0
test eax, eax
je 0x4b6a6b
mov ecx, 1
jmp 0x4b6a9a
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x24]
mov edi, dword [ebx + 0x14]
inc dword [ebx + 0xc]
lea eax, [ecx + ecx*4]
lea eax, [edi + eax*4]
mov dword [eax + 4], edx
xor edx, edx
mov byte [eax], 0x29
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov byte [ebx + 0x62], dl
mov eax, dword [ebp + 0x24]
mov dword [ebp + 0x38], ecx
or word [eax + 6], 8
mov ecx, dword [esp + 0x68]
mov edx, dword [esi + 0x230]
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
push eax
push ecx
push esi
mov byte [esp + 0x4c], 1
mov byte [esp + 0x4d], 0
mov dword [esp + 0x30], edx
call fcn.004ba480
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4b71c5
mov ecx, dword [ebx + 0xc]
cmp dword [ebx + 0x10], ecx
mov dword [esp + 0x1c], ecx
jg 0x4b6b0a
mov edi, ebx
call fcn.0048d6b0
test eax, eax
je 0x4b6b06
mov eax, 1
jmp 0x4b6b37
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x14]
inc dword [ebx + 0xc]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x20]
mov dword [eax + 4], edx
xor edx, edx
mov byte [eax], 0x29
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov byte [ebx + 0x62], dl
mov eax, ecx
mov ecx, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x28]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x28], ecx
mov dword [ebp + 0x3c], eax
xor eax, eax
lea ecx, [esp + 0x40]
push ecx
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], eax
mov eax, dword [esi + 0x230]
push ebp
push esi
mov dword [esp + 0x50], edx
mov dword [esp + 0x2c], eax
call fcn.004ba480
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp + 0x1c]
mov dword [ebp + 0x1c], ecx
fld qword [ecx + 0x48]
fcomp qword [ebp + 0x48]
mov dword [esp + 0x24], eax
add esp, 0xc
mov dword [esp + 0x1c], edx
fnstsw ax
test ah, 5
jp 0x4b6b95
fld qword [ecx + 0x48]
fstp qword [ebp + 0x48]
mov eax, dword [ebp + 0x28]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00499e60
mov edx, dword [esp + 0x30]
add esp, 8
cmp byte [esp + 0x30], 5
mov dword [ebp + 0x28], edi
mov dword [ebp + 0x2c], edx
jne 0x4b6bd7
mov eax, dword [ebp + 0x1c]
mov ecx, ebp
test eax, eax
je 0x4b6bc9
mov ecx, eax
mov eax, dword [ecx + 0x1c]
test eax, eax
jne 0x4b6bc0
mov eax, dword [ecx]
push eax
push 0
push esi
call fcn.004b5eb0
add esp, 0xc
mov eax, ebx
call fcn.0048d8c0
mov edi, eax
mov eax, ebx
call fcn.0048d8c0
push edi
push ebp
push esi
mov dword [esp + 0x20], eax
call fcn.004b6550
mov ecx, dword [esp + 0x74]
add esp, 0xc
push 0
push edi
push ecx
push 0x41
mov eax, ebx
call fcn.0048d730
mov eax, esi
call fcn.0049e4e0
mov edx, dword [esp + 0x78]
mov esi, eax
push 0
push esi
push edx
push 0x3b
mov eax, ebx
call fcn.0048d730
mov edx, dword [esp + 0x88]
mov ecx, dword [esp + 0x34]
push 0
mov dword [esp + 0x4c], eax
push 0x31
push ebx
mov eax, esi
inc edx
call fcn.0048d850
mov edx, dword [esp + 0x90]
add esp, 0x2c
call fcn.0049e500
mov esi, dword [esp + 0x14]
mov eax, dword [ebp]
mov edx, dword [eax]
push edi
push esi
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x74]
push 0xffffffffffffffff
push 0
push edx
mov edx, dword [esp + 0x7c]
push ecx
push eax
push ebp
push edx
call fcn.004b4f20
mov edx, esi
mov ecx, ebx
call fcn.0048d960
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x90]
push 0
push eax
push ecx
push 0x43
mov eax, ebx
call fcn.0048d730
add esp, 0x38
mov edx, edi
mov ecx, ebx
call fcn.0048d960
mov esi, dword [ebx + 0xc]
cmp dword [ebx + 0x10], esi
jg 0x4b6cb2
mov edi, ebx
call fcn.0048d6b0
test eax, eax
jne 0x4b6cde
mov eax, dword [ebx + 0x14]
inc dword [ebx + 0xc]
mov ecx, dword [esp + 0x68]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
inc ecx
mov dword [eax + 4], ecx
xor ecx, ecx
mov byte [eax], 0x2b
mov byte [eax + 3], 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov byte [ebx + 0x62], cl
mov esi, dword [ebx + 0xc]
cmp dword [ebx + 0x10], esi
jg 0x4b6cf5
mov edi, ebx
call fcn.0048d6b0
test eax, eax
jne 0x4b70b0
mov edx, dword [ebx + 0x14]
inc dword [ebx + 0xc]
lea ecx, [esi + esi*4]
lea eax, [edx + ecx*4]
mov ecx, dword [esp + 0x68]
mov dword [eax + 4], ecx
xor ecx, ecx
mov byte [eax], 0x2b
mov byte [eax + 3], 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov byte [ebx + 0x62], cl
jmp 0x4b70b0
mov edx, dword [ebp + 0x28]
mov dword [eax + 0x28], edx
mov ecx, dword [ebp + 0x2c]
mov dword [eax + 0x2c], ecx
mov edx, dword [esi + 0x230]
lea ecx, [esp + 0x30]
push ecx
push eax
push esi
mov dword [esp + 0x74], 0
mov dword [esp + 0x30], edx
call fcn.004ba480
mov edi, eax
xor eax, eax
add esp, 0xc
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], eax
cmp edi, eax
jne 0x4b71c5
mov edi, dword [esp + 0x14]
mov dword [ebp + 0x1c], eax
mov edx, dword [edi + 0x30]
mov dword [ebp + 0x30], edx
mov eax, dword [edi + 0x34]
mov dword [ebp + 0x34], eax
mov dword [esp + 0x28], edx
test edx, edx
je 0x4b6dd4
mov ecx, dword [ebx + 0xc]
cmp dword [ebx + 0x10], ecx
mov dword [esp + 0x68], ecx
jg 0x4b6da5
mov edi, ebx
call fcn.0048d6b0
test eax, eax
je 0x4b6d9d
mov ecx, 1
jmp 0x4b6dcc
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x28]
mov edi, dword [ebx + 0x14]
inc dword [ebx + 0xc]
lea eax, [ecx + ecx*4]
lea eax, [edi + eax*4]
mov dword [eax + 4], edx
xor edx, edx
mov byte [eax], 0x73
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov byte [ebx + 0x62], dl
mov edi, dword [esp + 0x14]
mov dword [esp + 0x68], ecx
mov ecx, dword [esi + 0x230]
lea edx, [esp + 0x30]
push edx
push ebp
push esi
mov dword [esp + 0x2c], ecx
call fcn.004ba480
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp + 0x1c], edi
fld qword [edi + 0x48]
fadd qword [ebp + 0x48]
add esp, 0xc
mov dword [esp + 0x1c], eax
fstp qword [ebp + 0x48]
mov edi, dword [edi + 0x28]
test edi, edi
je 0x4b6e32
lea ecx, [esp + 0x2c]
push ecx
push edi
call fcn.0049ab10
add esp, 8
test eax, eax
je 0x4b6e32
fild dword [esp + 0x2c]
fcom qword [ebp + 0x48]
fnstsw ax
test ah, 5
jp 0x4b6e30
fstp qword [ebp + 0x48]
jmp 0x4b6e32
fstp st(0)
mov eax, dword [esp + 0x68]
test eax, eax
je 0x4b70b0
mov ecx, dword [ebx + 0xc]
cmp ecx, eax
jle 0x4b70b0
lea edx, [eax + eax*4]
mov eax, dword [ebx + 0x14]
mov dword [eax + edx*4 + 8], ecx
jmp 0x4b70b0
cmp dl, 1
jne 0x4b6e73
cmp dword [ebp + 0x28], 0
jne 0x4b6e73
cmp dword [ebp + 0x2c], 0
jne 0x4b6e73
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x68], ecx
jmp 0x4b6edc
mov edx, dword [esi + 0x44]
lea eax, [edx + 1]
mov dword [esi + 0x44], eax
mov ecx, dword [ebx + 0xc]
cmp dword [ebx + 0x10], ecx
mov dword [esp + 0x68], edx
mov dword [esp + 0x2c], ecx
jg 0x4b6ea6
mov edi, ebx
call fcn.0048d6b0
test eax, eax
je 0x4b6e9e
mov ecx, 1
jmp 0x4b6ecd
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x68]
mov edi, dword [ebx + 0x14]
inc dword [ebx + 0xc]
lea eax, [ecx + ecx*4]
lea eax, [edi + eax*4]
mov dword [eax + 4], edx
xor edx, edx
mov byte [eax], 0x29
mov byte [eax + 3], 0
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov byte [ebx + 0x62], dl
mov eax, dword [ebp + 0x24]
mov dword [ebp + 0x38], ecx
or word [eax + 6], 8
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x68]
mov edx, dword [esi + 0x230]
mov dword [esp + 0x54], ecx
xor ecx, ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x50]
push ecx
push eax
push esi
mov byte [esp + 0x5c], 1
mov byte [esp + 0x5d], 0
mov dword [esp + 0x30], edx
call fcn.004ba480
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4b71c5
cmp byte [ebp + 4], 0x72
mov edx, dword [ebp + 0x28]
sete al
xor ecx, ecx
mov dword [esp + 0x2c], edx
mov edx, dword [ebp + 0x2c]
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x28], ecx
mov dword [ebp + 0x2c], ecx
lea ecx, [esp + 0x50]
inc al
push ecx
mov byte [esp + 0x54], al
mov eax, dword [esi + 0x230]
push ebp
push esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], eax
call fcn.004ba480
mov edx, dword [ebp + 0x18]
mov edi, dword [esp + 0x1c]
add esp, 0xc
push edx
mov dword [esp + 0x1c], eax
call fcn.0049a950
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x18]
add esp, 4
cmp byte [ebp + 4], 0x70
mov dword [esp + 0x1c], eax
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x18], 0
jne 0x4b6f94
mov edx, ecx
fld qword [edx + 0x48]
fadd qword [ebp + 0x48]
fstp qword [ebp + 0x48]
mov eax, dword [ebp + 0x28]
push eax
mov ecx, edi
push ecx
call fcn.00499e60
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [ebp + 0x2c], eax
mov al, byte [esp + 0x38]
mov dword [ebp + 0x28], edx
xor edx, edx
add esp, 8
mov dword [ebp + 0x30], edx
mov dword [ebp + 0x34], edx
cmp al, 1
je 0x4b70b0
cmp al, 5
jne 0x4b6fe8
mov eax, dword [ebp + 0x1c]
mov ecx, ebp
cmp eax, edx
je 0x4b6fdb
mov ecx, eax
mov eax, dword [ecx + 0x1c]
cmp eax, edx
jne 0x4b6fd2
mov ecx, dword [ecx]
push ecx
push edx
push esi
call fcn.004b5eb0
add esp, 0xc
mov eax, ebx
call fcn.0048d8c0
mov edi, eax
mov eax, ebx
call fcn.0048d8c0
push edi
push ebp
push esi
mov dword [esp + 0x20], eax
call fcn.004b6550
mov edx, dword [esp + 0x74]
add esp, 0xc
push 0
push edi
push edx
push 0x41
mov eax, ebx
call fcn.0048d730
mov ecx, dword [esp + 0x24]
mov eax, dword [ebx + 0xc]
push edi
push ecx
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x84]
push 0xffffffffffffffff
mov dword [esp + 0x4c], eax
mov eax, dword [ebp]
mov ecx, dword [eax]
push 0
push ecx
push edx
push eax
push ebp
push esi
call fcn.004b4f20
mov edx, dword [esp + 0x4c]
mov ecx, ebx
call fcn.0048d960
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0xa0]
push 0
push eax
push ecx
push 0x43
mov eax, ebx
call fcn.0048d730
add esp, 0x48
mov edx, edi
mov ecx, ebx
call fcn.0048d960
mov esi, dword [ebx + 0xc]
cmp dword [ebx + 0x10], esi
jg 0x4b7086
mov edi, ebx
call fcn.0048d6b0
test eax, eax
jne 0x4b70b0
mov eax, dword [ebx + 0x14]
xor ecx, ecx
inc dword [ebx + 0xc]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x68]
mov byte [eax], 0x2b
mov byte [eax + 3], cl
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov byte [ebx + 0x62], cl
mov al, byte [ebp + 4]
mov edx, dword [esp + 0x20]
xor ecx, ecx
cmp al, 0x71
setne cl
movzx eax, al
push ecx
mov ecx, dword [esp + 0x28]
push edx
push ecx
mov ecx, dword [esp + 0x70]
call fcn.004b5590
add esp, 0xc
test byte [ebp + 6], 8
je 0x4b71c1
mov edx, dword [ebp]
mov eax, dword [edx]
mov dword [esp + 0x68], eax
lea edi, [eax + eax*4 + 0x10]
mov eax, dword [esp + 0x10]
call fcn.00474f40
mov dword [esp + 0x24], eax
test eax, eax
jne 0x4b7104
lea edi, [eax + 7]
jmp 0x4b71c5
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0xc]
mov al, byte [edx + 0x49]
mov esi, dword [esp + 0x24]
mov byte [esi + 4], al
mov eax, dword [esp + 0x68]
mov word [esi + 6], ax
xor edi, edi
add esi, 0xc
test eax, eax
jle 0x4b7158
lea esp, [esp]
mov ecx, dword [esp + 0x64]
push edi
push ebp
push ecx
call fcn.004b6840
add esp, 0xc
mov dword [esi], eax
test eax, eax
jne 0x4b714e
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x2c]
mov dword [esi], eax
inc edi
add esi, 4
cmp edi, dword [esp + 0x68]
jl 0x4b7130
mov esi, ebp
mov dword [esp + 0x64], ebp
mov edi, edi
xor ebp, ebp
lea edi, [esi + 0x38]
mov eax, dword [edi]
test eax, eax
jl 0x4b71a4
cmp dword [ebx + 0xc], eax
jle 0x4b7182
mov esi, dword [esp + 0x68]
mov edx, dword [ebx + 0x14]
lea ecx, [eax + eax*4]
mov dword [edx + ecx*4 + 8], esi
mov esi, dword [esp + 0x64]
mov ecx, dword [esp + 0x24]
push ecx
push ebx
mov ecx, 0xfffffffa
call fcn.0048dd20
mov dword [edi], 0xffffffff
inc ebp
add esp, 8
add edi, 4
cmp ebp, 2
jl 0x4b7165
mov esi, dword [esi + 0x1c]
mov dword [esp + 0x64], esi
test esi, esi
jne 0x4b7160
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.00474d20
add esp, 8
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x6c]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
test esi, esi
je 0x4b71f4
mov ebx, dword [esp + 0x10]
push esi
push ebx
call fcn.004b43f0
push esi
push ebx
call fcn.00474d20
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret