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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
push ebx
mov ebx, eax
mov eax, dword [ebx]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x38], edx
mov edx, dword [eax + 8]
push esi
xor ecx, ecx
mov dword [esp + 0x40], edx
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x3c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], esi
cmp dword [esi + 0x38], ecx
je 0x46d1cf
movzx eax, byte [edi + 4]
sub eax, 0x74
je 0x46d1ae
dec eax
je 0x46d1a7
dec eax
je 0x46d1a0
mov eax, str.UNION
jmp 0x46d1b3
mov eax, str.INTERSECT
jmp 0x46d1b3
mov eax, str.EXCEPT
jmp 0x46d1b3
mov eax, str.UNION_ALL
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
push ebx
call fcn.0044f750
add esp, 0xc
mov dword [esp + 0x14], 1
jmp 0x46d98c
cmp dword [esi + 0x44], ecx
je 0x46d217
movzx eax, byte [edi + 4]
sub eax, 0x74
je 0x46d20a
dec eax
je 0x46d1fd
dec eax
je 0x46d1f0
mov eax, str.UNION
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x46d1b9
mov eax, str.INTERSECT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x46d1b9
mov eax, str.EXCEPT
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x46d1b9
mov eax, str.UNION_ALL
push eax
push str.LIMIT_clause_should_come_after__s_not_before
jmp 0x46d1b9
mov eax, dword [ebx + 8]
mov dword [esp + 0x10], eax
cmp eax, ecx
jne 0x46d252
call fcn.00478a80
mov dword [ebx + 8], eax
mov dword [esp + 0x10], eax
test eax, eax
je 0x46d245
push 0x9a
mov esi, eax
call fcn.00478be0
mov esi, dword [esp + 0x20]
add esp, 4
cmp dword [ebx + 0x19c], 0
jne 0x46d252
mov byte [ebx + 0x19], 1
mov cl, byte [esp + 0x3c]
cmp cl, 8
jne 0x46d293
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x10]
push edx
push eax
push 0x37
call fcn.00478ca0
mov ecx, esi
mov eax, dword [ecx + 4]
add esp, 0xc
test eax, eax
je 0x46d289
mov edx, esi
mov ecx, dword [edx + 0x20]
lea ecx, [ecx + ecx*2]
mov byte [eax + ecx*8 - 0x15], 8
mov esi, dword [esp + 0x1c]
mov cl, 0xa
mov byte [esp + 0x3c], cl
mov edx, dword [edi]
mov eax, dword [esi]
mov edx, dword [edx]
cmp edx, dword [eax]
je 0x46d2d2
test byte [edi + 6], 0x80
je 0x46d2be
push str.all_VALUES_must_have_the_same_number_of_terms
push ebx
call fcn.0044f750
add esp, 8
mov dword [esp + 0x14], 1
jmp 0x46d98c
movzx eax, byte [edi + 4]
call fcn.0046b260
push eax
push str.SELECTs_to_the_left_and_right_of__s_do_not_have_the_same_number_of_result_columns
jmp 0x46d1b9
mov eax, 0x800
test word [edi + 6], ax
je 0x46d2f1
lea ecx, [esp + 0x3c]
push ecx
push edi
push ebx
call fcn.0046ca20
add esp, 0xc
jmp 0x46d832
cmp dword [edi + 0x38], 0
je 0x46d30c
mov edx, dword [ebp + 0xc]
push edx
push edi
push ebx
call fcn.0046ddf0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, byte [edi + 4]
sub eax, 0x73
je 0x46d64a
dec eax
je 0x46d542
dec eax
je 0x46d64a
mov eax, dword [ebx + 0x48]
mov esi, dword [esp + 0x10]
push 0
push eax
lea ecx, [eax + 2]
push 0x37
mov dword [esp + 0x24], eax
mov dword [ebx + 0x48], ecx
call fcn.00478ca0
mov dword [edi + 0x10], eax
mov ecx, dword [edi + 0x40]
add esp, 0xc
mov eax, edi
test ecx, ecx
je 0x46d35a
mov eax, ecx
mov ecx, dword [eax + 0x40]
test ecx, ecx
jne 0x46d351
or word [eax + 6], 8
mov edx, dword [esp + 0x18]
mov eax, dword [ebx + 0x1d8]
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x1c]
push ecx
push edx
xor esi, esi
push ebx
mov word [esp + 0x5c], 1
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x34], eax
call fcn.00471a60
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, esi
jne 0x46d98c
mov eax, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x14]
inc eax
push eax
push 0x37
call fcn.00478ca0
mov ecx, dword [edi + 0x48]
mov esi, dword [edi + 0x44]
mov dword [edi + 0x14], eax
xor eax, eax
mov dword [edi + 0x3c], eax
mov dword [edi + 0x44], eax
mov dword [edi + 0x48], eax
mov eax, dword [esp + 0x24]
mov edx, dword [ebx + 0x1d8]
inc eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x5c]
push eax
push edi
push ebx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x3c], edx
call fcn.00471a60
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x3c], eax
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x24]
add esp, 0x18
cmp dword [edi + 0x24], eax
jb 0x46d417
ja 0x46d411
cmp dword [edi + 0x20], ecx
jbe 0x46d417
mov dword [edi + 0x20], ecx
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x44]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.00473fd0
mov edx, dword [esp + 0x38]
add esp, 8
cmp byte [esp + 0x3c], 5
mov dword [edi + 0x44], esi
mov dword [edi + 0x48], edx
jne 0x46d459
mov eax, dword [edi + 0x3c]
mov ecx, edi
test eax, eax
je 0x46d44b
mov ecx, eax
mov eax, dword [ecx + 0x3c]
test eax, eax
jne 0x46d442
mov eax, dword [ecx]
push eax
push 0
push ebx
call fcn.0046bf30
add esp, 0xc
mov eax, dword [esp + 0x10]
call fcn.00478f10
mov esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], esi
call fcn.00478f10
mov dword [esp + 0x1c], eax
push esi
push edi
mov eax, ebx
call fcn.0046c6b0
mov ecx, dword [esp + 0x20]
push esi
mov esi, dword [esp + 0x1c]
push ecx
push 0x69
call fcn.00478ca0
mov ecx, ebx
call fcn.00478a00
mov edx, dword [esp + 0x2c]
push eax
push edx
push 0x62
mov dword [esp + 0x54], eax
call fcn.00478ca0
mov esi, dword [esp + 0x54]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x3c]
push 0
push esi
push eax
mov eax, dword [esp + 0x44]
inc eax
push eax
mov eax, dword [esp + 0x40]
push 0x41
call fcn.00478e60
mov edx, ebx
call fcn.00478a20
mov ecx, dword [esp + 0x64]
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [edi]
push esi
lea edx, [esp + 0x78]
push edx
push 0
push 0
push eax
push ecx
push edi
push ebx
call fcn.0046a630
mov ecx, dword [esp + 0x68]
add esp, 0x58
push esi
call fcn.00478f80
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
push edx
push eax
push 9
mov esi, ecx
call fcn.00478ca0
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, esi
call fcn.00478f80
mov eax, dword [esp + 0x2c]
push 0
inc eax
push eax
push 0x3a
call fcn.00478ca0
mov edx, dword [esp + 0x38]
push 0
push edx
push 0x3a
call fcn.00478ca0
add esp, 0x2c
jmp 0x46d832
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov ecx, dword [edi + 0xc]
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 0x44]
mov dword [esi + 0x44], edx
mov eax, dword [edi + 0x48]
lea edx, [esp + 0x3c]
push edx
mov dword [esi + 0x48], eax
mov ecx, dword [ebx + 0x1d8]
push esi
push ebx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], ecx
call fcn.00471a60
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [edi + 0x44], ecx
mov dword [edi + 0x48], ecx
cmp eax, ecx
jne 0x46d98c
mov dword [edi + 0x3c], ecx
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov ecx, dword [esi + 0xc]
mov dword [edi + 0xc], ecx
test eax, eax
je 0x46d5c9
mov esi, dword [esp + 0x10]
push eax
push 0x87
call fcn.00478c40
mov edx, esi
push str.Jump_ahead_if_LIMIT_reached
push edx
mov dword [esp + 0x40], eax
call fcn.00479490
mov esi, dword [esp + 0x2c]
add esp, 0x10
mov eax, dword [ebx + 0x1d8]
lea ecx, [esp + 0x3c]
push ecx
push edi
push ebx
mov dword [esp + 0x30], eax
call fcn.00471a60
mov edx, dword [edi + 0x3c]
mov dword [edi + 0x3c], esi
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x20]
add esp, 0xc
add dword [edi + 0x20], eax
mov ecx, dword [esi + 0x24]
mov dword [esp + 0x2c], edx
adc dword [edi + 0x24], ecx
mov esi, dword [esi + 0x44]
test esi, esi
je 0x46d630
lea edx, [esp + 0x38]
push edx
push esi
call fcn.00474eb0
add esp, 8
test eax, eax
je 0x46d630
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x46d630
cdq
cmp dword [edi + 0x24], edx
jb 0x46d630
ja 0x46d62a
cmp dword [edi + 0x20], eax
jbe 0x46d630
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], edx
mov eax, dword [esp + 0x30]
test eax, eax
je 0x46d832
mov edx, dword [esp + 0x10]
call fcn.004791a0
jmp 0x46d832
cmp cl, 1
jne 0x46d659
mov edx, dword [esp + 0x40]
mov dword [esp + 0x18], edx
jmp 0x46d695
mov eax, dword [ebx + 0x48]
mov esi, dword [esp + 0x10]
push 0
push eax
lea ecx, [eax + 1]
push 0x37
mov dword [esp + 0x24], eax
mov dword [ebx + 0x48], ecx
call fcn.00478ca0
mov dword [edi + 0x10], eax
mov ecx, dword [edi + 0x40]
add esp, 0xc
mov eax, edi
test ecx, ecx
je 0x46d68c
mov eax, ecx
mov ecx, dword [eax + 0x40]
test ecx, ecx
jne 0x46d683
or word [eax + 6], 8
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
xor eax, eax
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov eax, dword [ebx + 0x1d8]
push esi
push ebx
mov dword [esp + 0x74], edx
mov word [esp + 0x70], 1
mov dword [esp + 0x34], eax
call fcn.00471a60
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x46d98c
cmp byte [edi + 4], 0x75
mov edx, dword [edi + 0x44]
mov ecx, dword [edi + 0x48]
sete al
inc al
mov byte [esp + 0x64], al
lea eax, [esp + 0x64]
xor esi, esi
push eax
mov dword [edi + 0x3c], esi
mov dword [esp + 0x3c], edx
mov dword [edi + 0x44], esi
mov dword [edi + 0x48], esi
mov edx, dword [ebx + 0x1d8]
push edi
push ebx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x30], edx
call fcn.00471a60
mov ecx, dword [edi + 0x38]
mov edi, dword [esp + 0x2c]
push ecx
mov dword [esp + 0x24], eax
call fcn.00474ca0
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x3c]
mov eax, dword [esp + 0x2c]
add esp, 0x10
cmp byte [edi + 4], 0x73
mov dword [esp + 0x2c], edx
mov dword [edi + 0x3c], eax
mov dword [edi + 0x38], esi
jne 0x46d749
mov ecx, dword [eax + 0x20]
add dword [edi + 0x20], ecx
mov edx, dword [eax + 0x24]
adc dword [edi + 0x24], edx
mov eax, dword [edi + 0x44]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.00473fd0
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [edi + 0x48], eax
mov al, byte [esp + 0x44]
add esp, 8
mov dword [edi + 0x44], edx
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
cmp al, 1
je 0x46d832
cmp al, 5
jne 0x46d79d
mov ecx, edi
mov eax, dword [ecx + 0x3c]
cmp eax, esi
je 0x46d790
mov ecx, eax
mov eax, dword [ecx + 0x3c]
cmp eax, esi
jne 0x46d787
mov ecx, dword [ecx]
push ecx
push esi
push ebx
call fcn.0046bf30
add esp, 0xc
mov esi, dword [esp + 0x10]
mov eax, esi
call fcn.00478f10
mov edi, eax
mov eax, esi
mov dword [esp + 0x1c], edi
call fcn.00478f10
mov edx, dword [ebp + 8]
mov dword [esp + 0x30], eax
push edi
push edx
mov eax, ebx
call fcn.0046c6b0
push edi
mov edi, dword [esp + 0x24]
push edi
push 0x69
call fcn.00478ca0
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
push ecx
push edx
mov dword [esp + 0x54], eax
lea eax, [esp + 0x58]
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push 0
push 0
push edi
push ecx
push eax
push ebx
call fcn.0046a630
mov edx, dword [esp + 0x68]
push edx
mov ecx, esi
call fcn.00478f80
mov eax, dword [esp + 0x74]
push eax
push edi
push 9
call fcn.00478ca0
mov ecx, dword [esp + 0x64]
add esp, 0x48
push ecx
mov ecx, esi
call fcn.00478f80
push 0
push edi
push 0x3a
call fcn.00478ca0
mov edi, dword [ebp + 8]
add esp, 0x10
mov al, byte [edi + 4]
mov ecx, dword [esp + 0x24]
xor edx, edx
cmp al, 0x74
setne dl
movzx eax, al
mov edi, ebx
push edx
mov edx, dword [esp + 0x2c]
push ecx
push edx
call fcn.0046b2d0
mov eax, dword [ebp + 8]
add esp, 0xc
test byte [eax + 6], 8
je 0x46d98c
mov ecx, eax
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
push eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
push eax
call fcn.0046b180
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x46d88e
mov dword [esp + 0x14], 7
jmp 0x46d98c
xor edi, edi
lea ecx, [esi + 0x14]
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x24], edi
jle 0x46d8cd
lea ecx, [ecx]
mov edx, dword [ebp + 8]
push edi
push edx
push ebx
call fcn.0046c870
mov ecx, dword [esp + 0x34]
add esp, 0xc
mov dword [ecx], eax
test eax, eax
jne 0x46d8c1
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 8]
mov dword [ecx], eax
add dword [esp + 0x28], 4
inc edi
cmp edi, dword [esp + 0x24]
jl 0x46d8a0
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], eax
jmp 0x46d8e0
add eax, 0x10
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
mov eax, dword [edx]
test eax, eax
js 0x46d96c
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x20], eax
jbe 0x46d910
mov ecx, dword [ecx + 4]
mov edi, dword [esp + 0x24]
lea edx, [eax + eax*2]
mov dword [ecx + edx*8 + 8], edi
inc dword [esi]
mov ecx, dword [esp + 0x10]
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x46d941
cmp byte [edi + 0x40], 0
jne 0x46d941
lea edx, [eax + eax*2]
movsx eax, byte [ecx + edx*8 + 1]
lea ebx, [ecx + edx*8]
mov ecx, dword [ebx + 0x10]
call fcn.004791c0
mov dword [ebx + 0x10], esi
mov byte [ebx + 1], 0xfa
jmp 0x46d94d
mov ecx, esi
mov eax, 0xfffffffa
call fcn.004791c0
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
inc eax
mov dword [ecx], 0xffffffff
add ecx, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], ecx
cmp eax, 2
jl 0x46d8ef
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x46d8e0
dec dword [esi]
jne 0x46d98c
push esi
call fcn.0044f1b0
add esp, 4
mov eax, dword [ebp + 0xc]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
test esi, esi
je 0x46d9bc
mov edi, dword [esp + 0x20]
push esi
push edi
call fcn.00469890
add esp, 8
mov eax, esi
mov ecx, edi
call fcn.0044f250
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret